Generally flv files are flash files and i dont see any option given anywhere for its loop feature. So can anyone tell me how to loop flv files? How to get a .flv file to loop or restart itself when it's done playing? Thanks for any help.
Generally flv files are flash files and i dont see any option given anywhere for its loop feature. So can anyone tell me how to loop flv files? How to get a .flv file to loop or restart itself when it's done playing? Thanks for any help.
ALWAYS RIGHT - OTHER WISE I WUDNT SEY IT
You can do something like this if you are loading external flv files and using the NetStream method accepting that you know the length of your .flv file:
if(my_ns.time==90){
my_ns.seek(0);
}
my_ns is your NetStream. (check out the actionscript dictionary)
Looping an FLV file requires being able to detect the end of the FLV, so this tutorial will cover both. The recommended method of detecting the end of the FLV playback is via the NetStream::onStatus event handler, by checking for NetStream.Play.Stop event. However, many people have reported that this event is not always sent (which could be due to undocumented bugs in the flv implementation on the NetStream class). For that reason, we will also need to create workaround for FLV files that does not send the NetStream.Play.Stop event.
More information here.
Hope the below code help you
Code:listenerObject = new Object(); listenerObject.complete = function(eventObject){ myMedia.stop(); myMedia.play(); trace ("ready"); } _root.myMedia.addEventListener("complete", listenerObject)
Bookmarks