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:
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?
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?