0 Replies Latest reply on Oct 18, 2010 8:33 AM by Scaljeri

    detect when MovieClip is ready with playing SWF

    Scaljeri

      Hi All

       

      I'm playing a movie like

       

      private var flashMovie:MovieClip;

       

      private function initMovie():void{

              flashMovie = loader.content as MovieClip;

       

      }

       

      // called by something else

      public function playMovie(e:Event):void {

          flashMovie.play() ;

      }

       

      public function readyPlaying():void {

          mx.controls.Alert.show("READY") ;

      }

       

      ....

       

      <mx:SWFLoader id="loader" source="@Embed(source='assets/movie.swf')" complete="initMovie()"/>

       

      However, when the movie is ready, I don't know how to call readyPlaying function. Is there an event I can trigger?, any suggestions ?

       

      cheers

      Luca