Copy link to clipboard
Copied
I want to replay a flash video by clicking on a "replay" button. I know how to creat the buttons. I can't figure out how to create the action script. Thanks in advance for any help.
I know how to create the Action Script to replay flash, but when I have a flash video that I want to replay that's when I run into trouble.
Copy link to clipboard
Copied
how are you playing the video?
Copy link to clipboard
Copied
I'm creating the Flash Video in After Effects. I'm importing the video to stage. I create the interactive buttons in Flash. I want the video to start playing once when the banner opens(and it does). After the video finishes, I want the viewer to have the option to watch it again by clicking on a replay button.
Copy link to clipboard
Copied
Hi,
This snippet should hint a solution to you (NetStream class):
netStream.seek = 0;
netStream.resume();
Anyway, you would need to know when the movie has finished playing.
On a Flash Media server, there should be an event just for that.
If you are not running on such a kind of server, make yourself a cuepoint to listen to, at the very last frame of the movie, so your app knows when its time to offer the replay functionality. You can insert cuepoints in a movie when you are in the Flash Video Encoder options.
____________________
Design Cyboïde
Copy link to clipboard
Copied
Thanks for your input. I got the following action script from a Lynda tutorial:
//Action Script to Start and Replay Flash Movie
import flash.display.MovieClip;
//Only use if you want the movie to start off stopped
movie.stop();
replayButn.addEventListener(MouseEvent.MOUSE_DOWN,startClip);
function startClip(e:MouseEvent):void {
movie.play();
}
This seems to work. I'm not sure if it's best practices, and am not sure if I need an Action Script pre-loader.
Copy link to clipboard
Copied
Hi,
I'm trying to do the same thing. After the video stops playing, I'd like to give the viewer option to replay the video. Is this code AS2 or 3? And did you also insert this code to another action layer? I'd appreciate any input.
Thanks,
Veli