ricardocabellov5.0balter-egos
trace mr.doob r08028
blogdemoscenefeaturedextrascontact
 *blog... kind of... *rss

« PV3D 2.0: How to do si...mrdoob.com v3 »

Loop a FLV in AS3 (and AS2)
06.12.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);
}
posted by mr.doob at 07:51
0 comment written so far

SORRY!
Is not that I don't care about what you have to say, of course I do, but they are speaking louder and I lost my patience :(
 *profile 



traditional id: Ricardo Cabello Miguel
based in: London, UK
serving to: Hi-ReS!
contact me: click here


 *latest posts 

* The Magic of Viral (10.10.2008)
* Jonathan Harris: Beyond Flash, an adde... (06.10.2008)
* Zeitgeist: Addendum (05.10.2008)
* Crisis (03.10.2008)
* Youtube, now in Super HD! (30.09.2008)
* Adobe AIR for Linux - Beta (28.09.2008)
* What does the Google Chrome logo inspi... (28.09.2008)
* Diesel: SFW XXX (25.09.2008)
* Muffler - August 2008 - Australia Tour... (22.09.2008)
* e-definition of creepy. (21.09.2008)
* Demoparty deadlines in real life. (20.09.2008)
* Service Pack 3 Setup Error, re-revisit... (16.09.2008)
* Not everybody can say ... (11.09.2008)
* Service Pack 3 Setup Error, revisited (10.09.2008)
* The Internet (2008) (10.09.2008)


 *latest comments 

* C++, SDL Coding? Maybe.. ;) (Preview) (trace)
* C++, SDL Coding? Maybe.. ;) (Preview) (Joey)
* La picaresca (spt)
* Mr. Slip Up (ricardo)
* La picaresca (ricardo)
* La picaresca (spt)
* La picaresca (sole)
* Demoscene @ Cirsa (sml)
* La picaresca (humphr3y)
* La picaresca (alfio)
* fiver2's new baby: debris (Jcl)
* Barcelona = full of shit(s) (Soli)
* Demoscene @ Cirsa (Scener)
* Rar & unrar with Ubuntu (SethPlate)
* Mindcandy 2 (Jcl)