2 Replies Latest reply on Nov 1, 2011 7:38 AM by Rothrock

    Detecting a change to a Variable?

    Jim Wiley Level 1

      Hi All,

      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).