FORUMS: list search recent posts

controlling FLV playback

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
MadMac66
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:

import mx.video.*;

var readyListen:Object = new Object();

readyListen.ready = function(eventObject:Object):Void {
trace("ready");
videoPlayer.play();
};

videoPlayer.addEventListener("ready", readyListen);

videoPlayer.contentPath = "video/Extender.flv";
_root.nav_mc.gotoAndStop("pooop");

var completeListen:Object = new Object();
completeListen.complete = function(eventObject:Object):Void {
_root.gotoAndStop("main");
};
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.

cheers
mm66


Return to posts index

thumbslinger
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:

import mx.video.FLVPlayback;

var myVideo:FLVPlayback;
myVideo.autoPlay = true;
myVideo.autoRewind = false;
myVideo.skin = false; //also can use parameters area
myVideo.contentPath="video/otherMovie.flv";

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 CreativeCOW.net All Rights Reserved
[TOP]