Daily Delicious - Video in Actionscript 3
6.02.07 @ 11:01 amFor nearly the past year of my life, Flash Video has been the main focus of my work. I was fortunate enough to have the opportunity to build the next-generation Flash Video player for Current TV in 2006 and I am currently working on another video player project for another large online media organization. With Actionscript 3.0 becoming a more viable option for development with every passing day (Flash Player 9 is up to about 50% penetration already), I am very interested in how the video model works under the new version of Flash’s programming language. After mucking around in AS3 for a short time, I was surprised at how easy the migration is - luckily, video is no exception.
I read a well done mini-writeup on Actionscript 3 video and I came away very excited at the prospect of using Actionscript 3 from this point forward. The code is leaner, and once and for all we can create a video object exclusively through Actionscript (it is about time).
Also, due to the Actionscript 3 event model (details here), no longer do we need to see this:
netStream.onStatus = function(sObj:NetStatusEvent) {
trace("sObj.info.code")
}
This has never been fun due to scoping issues and just an overall bloat to your code.
netStream.addEventListener(NetStatusEvent.NET_STATUS, status);
public function status(sObj:NetStatusEvent):Void {
trace(sObj.info.code);
}
With event listeners, it keeps the code much more consolidated with no more scoping problems and nested functions. Beautiful stuff. My next video project will most definitely be in Actionscript 3, my hope is all my future projects will be as well.
del.icio.us linkactionscript, code, daily, delicious, flash, flash video, link, media, programming, video video object actionscript 3

February 6th, 2007 at 10:34 pm
$0.00 in Comment Love for November
Thanks for the icons, dude. All the best. Cheers.
February 21st, 2007 at 11:07 pm
$0.00 in Comment Love for November
thats correct and thanks for the bit of code, really useful!