Rants /Raves about Actionscript 3
as3 Rants:
It’s been a few months using Actionscript 3 now, and though Actionscript 3 is a whole hell of a lot more standardized, I think it still has a bit of a way to go. There are still a lot of packages that require a different frame of mind when using another — primarily the DisplayObject and DisplayObjectContainer code. For instance:
addChild(), addChildAt(index), removeChild(), removeChildAt() – vs movieclip.filters = new Array() vs custom array functions
The other are the geom packages. When using graphics.drawRectangle — I have to pass in x,y,width,height — but when using bitmapData objects, I pass in a rectangle — why is this? I would like to standardize in some way — I would rather either pass in a rectangle to the drawRectangle, or pass in x,y,width,height for the bitmapdata objects. I know this is being a bit anal — but as far as code cleanliness is concerned, it would make life a lot easier to use standard conventions. I would also like to keep using just rectangle for it’s intersecting functions, but i find myself not using it unless i have to use bitmapdata objects.
Another rant would have to be more native code for the Array objects. How many functions have you written for Array.swap(index1, index2) – or Array.getIndexOf(object)? I know the as3 virtual machine is light years faster then the as1 and as2 versions, but since so much array access is done, wouldn’t it make sense to add these as well? It would also coincide with the DisplayObject functions, addChild(object), removechild(object), etc. I think the filters object needs this really bad too — addFilter(object), addFilterAt, removeFilter, would really simplify how we do things. None of this:
mc.filters = mc.filters.concat(new ColorMatrixFilter()) or:
mc.filters = new Array(new ColorMatrixFilter(), filter2, filter3, filter4, filter5)
It would also simplify things cause then we wouldn’t have to store indexes all the time for certain things, as well as a speed increase using native functions.
Oh, and I hope Keyboard.isDown makes a return into the beta 3 or the release, cause games will not be the same without them. the ispressed[ascii_code] doesn’t work when keyup can only return one keycode.
as3 Raves!
Always save the best for last, as they say. Actionscript is a lot cleaner, easier to manage — I haven’t even opened up the Flash 8 IDE since getting the flex alpha. It is that much better/faster. Aside from the logistal nightmares of adding a lot of objects into a component, the code is so much easier to manage, as well as the ByteArray is really gonna revolutionize how flash is used. It already is being used in amazing ways:
ByteArray to PNGEncoder: http://www.kaourantin.net/2005/10/more-fun-with-image-formats-in-as3.html
AIM Socket Connector: http://lab.zeusdesign.net/?p=13
IRC Socket Connector: http://blog.franto.com/go.php?http://blog.je2050.de/?p=35
This is obviously going to revolutionize how all entire projector suites out there right now — streaming an array of bitmapdata objects into a movie i’m sure has already been done (hint hint), and screen capture in/out of flash will be easier as well. It remains to be seen what Flex2 is going to offer the rest of the world, we’ll see if they all catch on, but for sure as3 is powerful enough to take over what has been a long standing dominance of Java to do the “harder” things to do, such as Processing, multiplayer games, even Max/MSP/Jitter might get a run for their money as far as gfx is concerned.
I’ve never really been a firm believer in web 2.0, but if there’s anything to suggest that it will be a success, these types of features embedded in browsers will be the primary reason why it’s successful, not the RIA element of web 2.0.


yo, just checking to see make sure the comments work. I don’t see a comment I made earlier.
Comment on March 7, 2006 @ 11:03 am
i think i got everything moderated right now, still getting used to wordpress. thanks for visiting =) — lemme know when you get that site done =)
Comment on March 7, 2006 @ 3:05 pm
colemont brokers insurance dallas dallas insurance colemont brokers
Comment on January 8, 2009 @ 2:04 pm