-
http://www.LineDetail.com
When an flv stops playing, is there a way to get it to loop and start again?
When an flv stops playing, is there a way to get it to loop and start again?
-Line
-
http://www.LineDetail.com
-
Senior Member
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.
Code:
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!
This is your brain. This is your brain on script.
-
http://www.LineDetail.com
layerburn, you rock thanks a ton!
-Line
-
FLV loop
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/a....cfm?cid=984BA
good luck
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|