[thelist] Running an .exe from a ListBox (Flash UI Compnent)
Diane Soini
dianesoini at earthlink.net
Fri Aug 6 09:44:27 CDT 2004
> Subject: [thelist] Running an .exe from a ListBox (Flash UI Compnent)
> Reply-To: "thelist at lists.evolt.org" <thelist at lists.evolt.org>
>
>
> Hi all,
> I have the following XML file feeding a ListBox component:
>
> <applications>
> <software name="Adobe Reader 6.01">
> <location>AdobeReader601.exe</location>
> </software>
> ...
> </applications>
>
> I've been successful in getting the name of the program to display in
> the ListBox, but I'd like to get the exe to run when the user clicks on
> the name of the application. I've already set
> "label=name;data=location"
> in the Bindings for the XML Connector and ListBox.
>
> What I need now is essentially an onClick function to run the
> corresponding exe. The Flash application is designed in the Slide Show
> Presentation mode, by the way. Anyone have any ideas? Thanks in
> advance.
>
> Minh Lee Goon
Did you try writing a function for this? I believe you have to create a
listener object for components, similar to this example:
myListener = new Object();
myListener.onChange = function() {
trace("onChange even fired");
};
mylistbox.addListener(myListener);
Substitute getURL for the trace function. I'm not certain, but I think
you have to use onChange not onClick for list boxes. You'll have to add
code to get the value of the selected item, too. You ought to find what
you need in the component reference in the help. I haven't used the
Slide Show tool, but I have added my own scripts successfully to the
quiz templates.
More information about the thelist
mailing list