Archive for the ‘ActionScript’ Category
FITC Amsterdam : Building High Performance iPhone Applications with ActionScript 3
Sorry for the two month hiatus on posting. I was on a sabbatical and vacation from work for the last 6 weeks of 2009, and have spent the first couple of weeks of 2010 busy working on code, and preparing some events for the spring (more on that in another post).
Some of the stuff I have continued to spend a lot of time working on, has been building iPhone content using the Flash CS5 private beta. I have been doing a lot of work on trying to figure out how to get the best performance, and understand the limits of Flash content on the device. I plan to make a separate post on that in the next couple of days.
Read the rest of this entry »
Case Study : ActionScript 3 Performance Optimization
Prompted by some of the work from Grant Skinner (in particular his FOTB 2009 session) and Thibault Imbert, I have been doing a lot of research lately into optimizing ActionScript 3 content. Not just how to make it run faster, but how to approach the process of optimization.
I am also starting to work on a small project which works with pixel data from images, and on which I anticipate performance might be an issue when working with larger images. I figured this would be a good opportunity to use some of the early code as a case study. I wanted to post the process and results here.
Read the rest of this entry »
Parsing and displaying BMP files via ActionScript
I dont have a formal computer science training / education, so I never got the chance to learn about working with low level data structures (bits and bytes). I have wanted to learn this for some time, but had difficulty finding resources for it which didnt assume I had a computer science degree.
Well, yesterday, FITC posted all of the video sessions from FITC Toronto, and I spent some time watching Lee Brimelow’s presentation on working with ByteArrays. It is a really great session, that provides a clear and solid foundation and understanding of working with ByteArrays and bits and bytes.
Anyways, after watching Lee’s session, it all finally clicked for me, and I spent some time last night putting together a simple parser that would dynamically load and display a 24Bit BMP image file within Flash.
Read the rest of this entry »
Converting from Matrix3D to Matrix in ActionScript 3
For the past month or two, I have been spending time building a game (something I havent done since my Flash 4 days). This has really been a lot of fun, as it has allowed me to use some of the Flash Player APIs which I really haven’t had a chance or need to use before.
One thing which I have been (slowly) learning about are using Matrix transformations on DisplayObjects. I made a post earlier showing how (with much, much help from Senocular), I was able to use Matrix to do hit tests using BitmapData.hitTest on DisplayObjects which have had transformations applied to them (in this case, rotation).
Well, I recently had the need to convert some of my DisplayObjects to use the 2.5D APIs (by setting the z property to a value). Unfortunately, this ended up breaking a lot of my code, mostly because of how it changes how transformations are applied to a DisplayObject. Specifically, when you set the DisplayObject.z property to any value, DisplayObject.transform.matrix will return null, and you must use DisplayObject.transform.matrix3D instead. Where this causes problems is when you are using APIs that expect to use a Matrix instance, as opposed to Matrix3D instance, such as BitmapData.draw.
Read the rest of this entry »
What new game APIs do you want in the Flash Player?
I have been learning some game development lately, and building my first game (well, at least my first game since Flash 4). I think game development and deployment are some of the real strengths of the Flash player, but ones which we haven’t specifically focused on in a while.
While working on my game, there were a couple of things I needed to do where additional player APIs could have made the development easier (as well as likely speeding up execution). This got me to thinking about other APIs that would be useful for game development. So, what new Flash Player APIs would you like to see that would make game development easier?
Here are a couple from me:
Read the rest of this entry »
Update to JSON support in as3corelib
Darron Schall has just checked in some changes and bug fixes to the JSON support in as3corelib. Among other things, Darron has added a strict mode which allows you to specify how strict of a conformance to the JSON spec you want the library to follow.
Read the rest of this entry »
Adobe drops restrictions on SWF, FLV formats
As you have probably seen, Adobe has dropped the licensing restrictions on both the SWF and FLV file formats. Among other things, you can know use the formats to create players that read in the formats.
Check out Ryan Stewart’s weblog for more discussion
We have also put up a site with some information, which includes a FAQ.
You can also download the specs:
initializing for loop counter outside of loop in ActionScript
Continuing my series of posts of interesting, but not too useful ActionScript tips (which I learned from studying Objective-C), did you know that you dont have to initialize your counter variable within a for loop.
For example, this is perfectly valid:
Read the rest of this entry »
Using Bitwise XOR to exchange variable values in ActionScript
I have been studying some Objective-C in my spare time, and was reading up on Bitwise operators tonight. I came across a simple way to exchange the value of two variables using the Exclusive-OR (XOR) operator that doesn’t require creating a temporary variable.
Normally, if you wanted to exchange the value of two variables, you would have to create a temp variable to store values temporarily (which uses additional memory). For example:
Read the rest of this entry »
Handling Flash File Uploads with .NET
Denis Sosnovtsev has posted a really useful blog post over on the atellis labs site. The post shows how to upload files from Flash to a .NET backend. The example includes both ActionScript and .NET / C# code snippets.
You can view the entire post here.
You can also view Mark Piller’s session from the on AIR Bus tour on integrating .NET with Adobe AIR applications.
Know any other good ActionScript / .NET resources and tutorials? Post them in the comments.





