1 Reply Latest reply on Oct 18, 2007 7:12 PM by ntsiii

    Need help with a SWFLoader

    mattf2007
      I have a application that is using a a VideoDisplay with cue points and I would like to have it cause several SWF's in the site act as if theuy have been clicked or moused over. Can anyone tell me if this is possible and if so let me know how?

      I want to give this SWF a click event.

      <mx:SWFLoader id="slPeel" x="0" y="-35" source="assets/movies/peel.swf" width="985" height="546"/>

      Here is the rest of it:

      <mx:VideoDisplay id="mvWelcome" x="465" y="226" width="520" height="390" source="assets/movies/Accufind_Shadows_002high.flv" backgroundAlpha="0.0" bufferTime="100" cuePointManagerClass="mx.controls.videoClasses.CuePointManager" cuePoint="cpHandler(event);">
      <mx:cuePoints>
      <mx:Array>
      <mx:Object name="rollPeel" time="40"/>
      <mx:Object name="invOpen" time="55"/>
      <mx:Object name="end" time="70"/>
      </mx:Array>
      </mx:cuePoints>
      </mx:VideoDisplay>

      private function cpHandler(event:CuePointEvent):void
      {

      if (event.cuePointName == "end")
      {
      mvWelcomeFade.play();
      }
      else if (event.cuePointName == "invOpen")
      {
      tabout.play();
      }
      else if (event.cuePointName == "rollPeel")
      {

      }
      }

        • 1. Re: Need help with a SWFLoader
          ntsiii Level 3
          I am not familiar with Videodisplay, but...

          One easy way to get events from a loaded swf is to use bubbling events.

          In the main app's init() function:
          this.addEventListener("loaded_swf_event",loadedSwfEventHandler);

          And in the loaded swf,
          dispatchEvent(new Event("loaded_swf_event",true); //the second parm makes it bubble

          Tracy