0 Replies Latest reply on Sep 10, 2010 3:07 PM by learner_doug

    listen for a variable in externally-loaded interactive swf

    learner_doug Level 1


      I'd like to set a variable inside an externally-loaded swf created in Flash Professional that is playing inside a Flex 4 application.  The swf will "signal" the end of an interaction (using a s:SWFLoader).  Once the variable is set (by arriving at a particular frame inside the externally-loaded swf, I'd like my Flex 4 application to "know" and take action to unload the swf and then "navigate" to another state with a new Flex-based interraction.


      Perhaps a step-based illustration will be more clear:


      1.  Clicking a textfield inside a Flex 4 application loads a custom component that uses an <s:SWFLoader> to load an external SWF that includes buttons to navigate through frames in a "slideshow" fashion.


      2.  Once the end of the "slideshow" is reached, a variable is instantiated by


                     var swfEND:String = "swfDne";


      3.  I'd like my Flex 4 calling application to know when this event occurs, then I'd like the sef to unload and Flex to goto another state.


      Any help, particularly on how to detect events in external swfs from Flex will be greatly appreciated.