1

I am looking forward to have a Event Listener, which gives me a possibility to start my actionscript after the FLV movie has finished its playing.

In AS2 I had the function VideoEvent.COMPLETE but that doesn't work in AS3.

I am using, Flash Action Player: 11.4

rptwsthi
  • 10,094
  • 10
  • 68
  • 109
zoom23
  • 694
  • 2
  • 10
  • 23
  • Perhaps this answers your question... http://stackoverflow.com/questions/13180087/as3-video-compelete-event-handler-not-working-addeventlistenerevent-complete/13185461#13185461 – crooksy88 Feb 16 '13 at 11:52

1 Answers1

1

Check if following statement is added,

 import fl.video.VideoEvent;

If still not working, then check Flash Version (must be above 10)

Yet no solution then try following,

check if it is "Event" not "VideoEvent",

yourFLVPlayer.addEventListener(Event.COMPLETE, onFLVPlayingCompleted);

 function onFLVPlayingCompleted(e:Event):void
 {
      trace("Finished playing FLV");
 }

I am just giving another tryout if event.complete is not working. Try the following code. Check for playheadTime.

 yourFLVPlayer.addEventListener(VideoEvent.STATE_CHANGE, flvPlayerStateChanged);     

 function flvPlayerStateChanged(e:VideoEvent):void
 {
      if (yourFLVPlayer.getVideoPlayer(0).state != "playing")
      {     
          trace("Stopped playing FLV"); 

          //You might check for playhead time
          trace(yourFLVPlayer.playheadTime);

          //if playheadtime is equal to total time of flv then you call it as end of FLV

      }
 }
Rajneesh Gaikwad
  • 1,193
  • 2
  • 14
  • 30
  • The yourFLVPlayer.addEventListener(Event.COMPLETE, onFLVPlayingCompleted); is correct. Thanks ! The Problem was, VideoEvent.Comlete changed to Event.Complete. – zoom23 Feb 18 '13 at 08:47