• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

FLVPlayback.complete coding help

New Here ,
Apr 26, 2010 Apr 26, 2010

Copy link to clipboard

Copied

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

TOPICS
ActionScript

Views

2.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Apr 26, 2010 Apr 26, 2010

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.

Votes

Translate

Translate
LEGEND ,
Apr 26, 2010 Apr 26, 2010

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 26, 2010 Apr 26, 2010

Copy link to clipboard

Copied

Thanks again Ned. I owe you a beer!!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 26, 2010 Apr 26, 2010

Copy link to clipboard

Copied

You're welcome

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 27, 2010 Apr 27, 2010

Copy link to clipboard

Copied

Hi

I have just tried the code you suggested but am getting this error:

1046: Type was not found or was not a compile-time constant: VideoEvent.

Any Ideas how to rectify?

Thanks again.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 27, 2010 Apr 27, 2010

Copy link to clipboard

Copied

LATEST

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

import fl.video.VideoEvent;

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines