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

Creating a Replay Button for a Flash Video

New Here ,
Apr 28, 2009 Apr 28, 2009

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.

TOPICS
ActionScript

Views

3.4K

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
Community Expert ,
Apr 28, 2009 Apr 28, 2009

Copy link to clipboard

Copied

how are you playing the video?

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 28, 2009 Apr 28, 2009

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.

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
Contributor ,
May 05, 2009 May 05, 2009

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

Création de sites web Montréal

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 ,
May 05, 2009 May 05, 2009

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.

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 ,
May 12, 2010 May 12, 2010

Copy link to clipboard

Copied

LATEST

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

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