apache-flexflex4swfloadernetconnection

flex4: fetch events from loaded swf using swfloader


I have a master swf that loads a child swf using SWFLoader class. the child swf is connecting to adobe flash media server using NetConnection class. using the parent swf i want to to display status regarding the connection. how can i do that ?


Solution

  • there is an example on how to do so at Tour de Flex on the swfloader class related example. so seeing the example plus reading the following URL resolved the issue.

    Creating and Dispatching Custom Events in AS3

    http://www.flashcoder.net/blog/?p=100

    it didn't work for me at first but then i noticed a very similar question at: How to raise an event from a SWF in a SWFLoader to a parent Flex application?

    and i noticed that the bubbles variable defaulted to false when it was supposed to be true. that solved my problem.