Can I detect a change to a variable (a data string)?
I am making a AS2 SWF (player level 7) with a combobox page navigation.
I have a page name variable that I am changing from outside of the SWF with Director and Authorware using (I believe) FlashVars.
The variable (internally) is set by default during SWF initialization.
The external variables values allowed are always one of the combobox's data field values.
The combobox default variable is not always index positon 0 (zero). Or the order of the data either.
The variable can get changed internally by the nav combobox used for navigation independent of the external variable. - this works
When the shared nav var is changed from the external source, the combobox needs to change to the match the corresponding combobox's data variable. This is what I am trying to do.
I can change the combobox setting programatically (index) but not get it to recognize it as a change event. Or tell it programatically
Can the combobox be selected by the data variable or is the only option to use the index (and loop through index values to match variable to data field)?
And update the combobox selection (and as a result the nav page) by triggering a change event programatically?
Detecting the var change cleanly without the OnEnterFrame trick is my goal - if it even works in the version I have to use (flash palyer 7).
You cannot programmatically create a change event since it is generated by user interaction. If code is changing the selection of the combobox, then that code executing should be all you need for whatever action you'd take if you did get a change event triggered.... in other potentially equal confusing terms... if the code is automatically changing the selection, then the code can also follow with executing whatever needs to be done for the change it just made.
You could use watch(). I haven't used it for a while so you will need to check the documentation.