I don’t partake of the Adobe Flash AS3 code bubbler very much any more, having saddled up with Objective-C and iOS/OS X development a lot more these days.
However, I do dabble in AS3 from time to time, generating some prototypes and simulations with it still. AS3 has been around for quite a number of years now and it does have it’s good points. It’s usually quite quick to roll something up quickly in regards to some kind of data visualization, audio/video manipulation, etc.
I just found (it’s already over three years old) a neat Class that simplifies AS3’s URLRequest class… making the loading of images, SWFs, sounds, downloading files, uploading files, and making web service calls a snap.
Head on over to http://code.google.com/p/quiero/ and check it out. Look what it can do below just for an idea.
Go from this
var request:URLRequest = new URLRequest('http://google.com/ig/api'); var loader:URLLoader = new URLLoader(); var variables:URLVariables = new URLVariables(); variables.weather = 'Salem, OR'; request.method = URLRequestMethod.GET; loader.addEventListener(Event.COMPLETE,onRequestComplete); loader.load(request); function onRequestComplete(e:Event):void { trace(e.target.data) }
To this
import quiero.* Quiero.request({url:'http://google.com/ig/api',method:'get',data:{weather:'Salem, OR'},onComplete:onRequestComplete}) function onRequestComplete(e:RequesterEvent):void { trace(e.data) }
Update: Google shut the door on this query, I tried out Yahoo! and it works fine, you just need to deal with a namespace.
Nasty. Removes all those nicely typed AS3 values with code hinting with a generic untyped object much akin to AS1.
It’s true that you don’t get the typing or hinting, but if you’re the sole developer on a smaller project/simulation/prototype it’s a lot more straightforward.
Being verbose on a team & keeping things typed and clear is a benefit of going the straight URLRequest route, but stuff like this has it’s place too.
10 years later I’m still unable to remember TweenLite parameter syntax. This would drive me through the same mental pain.
Haha… I’ve used TweenMax so much I think it’s almost part of my DNA now.