6 Replies Latest reply on Oct 8, 2010 11:31 AM by Flex harUI

    "Catching and Responding" to a Flash dispatched event

    learner_doug Level 1

      I am displatching an event from my flash movie:


      I N    F L A S H

      import flash.events.Event;

      dispatchEvent(new Event("endOfMovie", true, true);


      I N   F L E X

      swfLoader.content.addEventListener("endOfMovie", eomHandler);


      Q1:  Am I dispatching the event correctly in Flash?

      Q2: Now I'd like to know how to construct "eomHandler" to unload the swf (swfLoader).  I tried the following, but id doesn't work:


      private function eomHandler(event:Event):void





      Suggestions/corrections appreciated.