Skip navigation
Fetster77
Currently Being Moderated

FLVPlayback.complete coding help

Apr 26, 2010 5:58 AM

I am wanting to play a number of movie clips and flash produced video clips. On the main timeline I have a frame for each clip I want to play. In that frame is a flash movie that contains the video that I have embedded onto the timeline for the movie.

 

The filesize for this project is massive and I am struggling to work on the file.

 

I want to be able to play the video files with the playback component in each of the frames where the video was.

 

From a previos post I have made I was told that I need to add a listener 'FLVPlayback.complete' to let flash know when the video in that particular frame has finished playing.

 

Unfortunately I'm not familiar with Action Script coding at all and I am totally lost.

 

I would like the code to tell flash that once the video file in that particular frame is complete then move onto the next frame in the parent timeline. I need something that will do this 'MovieClip(parent).nextFrame();'  but only when the video has finished playing.

 

I'd be extremely grateful if somebody could tell me what I need codewise and how to set it up.

 

Sorry to sound cheeky but I really am struggling with this.

 

Many thanks

 
Replies
  • Currently Being Moderated
    Apr 26, 2010 6:19 AM   in reply to Fetster77

    Let's say you give your FLYPlayback an instance name of "fp".  You can add a complete event listener and event handler function using:

     

    fp.addEventListener(VideoEvent.COMPLETE, moveOn);

     

    function moveOn(evt:VideoEvent):void {

         MovieClip(parent).nextFrame();

    }

     

    That call in the function assumes your video play is inside a movieclip that sits in the main timeline.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 26, 2010 8:44 AM   in reply to Fetster77

    You're welcome

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 27, 2010 4:40 PM   in reply to Fetster77

    Try adding this line in the beginning of your code...

     

    import fl.video.VideoEvent;

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points