;

PDA

Click to See Complete Forum and Search --> : When an flv stops playing, is there a way to get it to loop and start again?


Line
03-16-2007, 01:36 PM
When an flv stops playing, is there a way to get it to loop and start again?

-Line

Line
03-17-2007, 09:11 AM
anyone?

layerburn
03-19-2007, 06:41 PM
Here is what I did for mine. I added a listener object to my video. Keep in mind that my flvplayback is called "my_video", you'll need to change this to whatever your instance name is. You'll place this on the frame that the video is on.

import mx.video.*;
var listenerObject:Object = new Object();
listenerObject.complete = function(eventObject:Object):Void {
my_video.play();
};
my_video.addEventListener("complete", listenerObject);

Hope this helps!

Line
04-15-2007, 10:30 AM
layerburn, you rock thanks a ton!

-Line

ready2learn
04-18-2007, 09:27 AM
Glad you got it working,

Here is another way: The NetStream.Play.Stop is the key to the universe, hehehe.

So add this code for what ever events you want to happen

ns.onStatus = function(info) {
if (info.code == "NetStream.Play.Stop") {
ns.seek(0);
ns.play();
}
};

also what ever other actions you want to happen can go here. Like, instead of the ns.play, you could have ns.pause, gotoAndPlay ("label"); or do what ever.

Here is the website that broke it open for me.

http://www.communitymx.com/content/article.cfm?cid=984BA

good luck