Solved

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

Posted on 2008-06-26
2
399 Views
Last Modified: 2012-06-27
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?
0
Comment
Question by:mrmyth
  • 2
2 Comments
 
LVL 1

Author Comment

by:mrmyth
ID: 21877117
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

0
 
LVL 1

Accepted Solution

by:
mrmyth earned 0 total points
ID: 21877856
I got it by looking in the help manual.

Once I got this kind of control, I just have it go back to frame one where the original play button is.
import fl.video.*;

my_FLVPlybk.source = "Day4Vlog.flv";

my_FLVPlybk.addEventListener(VideoEvent.COMPLETE, complete_listener);

// listen for complete event; play new FLV

function complete_listener(eventObject:VideoEvent):void {

    if (my_FLVPlybk.source == "Day4Vlog.flv") {

        gotoAndPlay(1);

    }

};

Open in new window

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Failed download 57 552
blocked plugin flash 5 111
PDF: Display my cards game? 8 98
Actionscript in Flash 3 47
Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to how to record live broadcast.

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now