Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing global variables using the Listbox component

Status
Not open for further replies.

kentara

Programmer
Apr 13, 2005
38
0
0
US
I have a list box named "listBox" with labels [First, Second, Third] and data [_global.first, _global.second, _global.third]. The listBox has a change handler configured for it called "changeGlobalVar". In Actionscript for the frame, I have:

Code:
function changeGlobalVar() {
     _global.openURL = listBox.getSelectedItem().data;
}

So, if the user clicks on "First" in the listbox, the variable _global.openURL should be set to the value of _global.first.

In the root level movie (not the one the listbox is in), I have an onEnterFrame set up to detect when _global.openURL changes and to open the string .swf filename specified in _global.openURL when it does.

My problem, however, is that using the listbox to change the _global.openURL variable for navigation results in the root level movie trying to open a filename called something like "_global.first" instead of the actual value of the variable _global.first.

Does anybody know what I'm doing wrong?
 
I still haven't figured this out. Any thoughts, folks? :)
 
can you post the fla....cant tell whats wrong from the description
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top