FORUMS: list search recent posts

controlling FLV playback

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
controlling FLV playback
on May 16, 2007 at 12:29:13 am

Here is a tough moebius loop of a problem I have been trying to work around. I have an FLVPlayback component on the stage. The code to implement this is as follows:


var readyListen:Object = new Object();

readyListen.ready = function(eventObject:Object):Void {

videoPlayer.addEventListener("ready", readyListen);

videoPlayer.contentPath = "video/Extender.flv";

var completeListen:Object = new Object();
completeListen.complete = function(eventObject:Object):Void {
videoPlayer.addEventListener("complete", completeListen);

What I had wanted to do is on press of the STOP btn (FLV controls) the video to be made invisible and the root to go back to frame 1. Unfortunately, the listener detects it is stopped before it is even started and immediately goes to frame 1 and invisible state.

So I tried using the 'ready' event before playing, and embedding the stop listener in a function to delay it being called. This too failed to do what I wanted.

So if this makes any sense, what is the trick to getting the movie to Do something on press of the controls, or tricking it some other way using events?

Many many thanks to the COW community if they can help me out.


Return to posts index

Re: controlling FLV playback
on May 23, 2007 at 3:03:56 pm

Turn off skin then pull buttons out of the Components/Media

Name each button on stage (or graphic) and use this format:


var myVideo:FLVPlayback;
myVideo.autoPlay = true;
myVideo.autoRewind = false; = false; //also can use parameters area

with (myVideo){
playPauseButton = vcPlayPause; //setting methods = to instance name of graphic/con to use.
stopButton = vcStop;
seekBar = vcSeek;
backButton = vcRew;
forwardButton = vcFFwd;

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved