Link to home
Start Free TrialLog in
Avatar of mrmyth
mrmythFlag for United States of America

asked on

play the flv video and then move to the next frame when it's done

I am having trouble with my actionscript.

I have a first frame that shows a play button, a second frame that has a video component that plays an flv

The next frame is another button to play it again.

I'm getting hung up on making it stop on each frame, let the event occur (pushing of the button or playing of the flv) and then having it move to the appropriate frame.

Any advice?
Avatar of mrmyth
mrmyth
Flag of United States of America image

ASKER

Here is a suggestion I came across

I have a "stop();" function on the video frame to make it stop and play the video.

When I name the instance of the video component myFLV and put the following code below the "stop();" my swf just plays straight through and doesn't stop anywhere.
var listenerObject:Object = new Object();
listenerObject.complete = function(eventObject:Object):Void {
	 // sends the playhead to the begining
	 myFLV.seek(0);
	 // plays the FLV again
	 myFLV.play();
};
myFLV.addEventListener("complete", listenerObject);

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of mrmyth
mrmyth
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial