Loop a FLV in AS3 (and AS2)

December 6th 2007

Lots of people always ask stuff like that (me the first), and after a while without having to deal with video on flash, I had to do it today and a very easy solution popped out.

function onFLVMetaData( metadata:Object ) :void
{
Tweener.addTween( this, { time: metadata.duration, onComplete: restartVideo } );
}

Simple and beautiful. Thanks once again Tweener! :D

Updated
However, the proper way to do that on AS3 is this one:

function netStatusHandler( event:NetStatusEvent ) :void
{
if(event.info.code == "NetStream.Play.Stop")
stream.seek(0); }
2 comments written so far...

thanks for the loop flv code.
February 15th 2009
joe
u = lifesaver
April 14th 2009
xero / the.fontvir.u

Have your say!

Name:

Website:

Comment:

Some of the projects that I worked on.



Some of the HTML5 and Actionscript experiments I've done.