Flex Formatter


In my new position at litl, we are using an extremely handy plugin for Eclipse and Flash Builder called Flex Formatter.

One of the cool things about the plugin is that you can set it up to automatically format when you save a file, so your code will always conform to your company's code style guidelines, and more importantly, look nice and consistent for other developers on your team.

You can export your formatting settings into a file that other developers can use so that everyone is using the same coding style. I've included my formatting properties file below, as it takes a little configuring to get everything to your liking.

You can download the plugin from this link, or you can use the URL below as an update site for Eclipse (In Flash Builder, go to the Help menu, then Software updates...):


My formatting properties file.

Posted by Ash on March 10th, 2010

Filed under General | 1 Comment »

New forum open


I set up a forum for the Razor component framework. If you head over there, our dedicated team of helper monkeys will be ready to answer any questions you have.

For the forum, click here.
For more info, click here.

Posted by Ash on January 18th, 2010

Filed under Discussion | 1 Comment »

Creating a Flex-free MXML app with Razor


As it turns out, it was fairly simple to add support to the base Razor component classes to enable them for use inside mxml. You can use the razor.controls.Application class as the base tag for your mxml, change the default namespace, and instantiate any of the razor components with regular mxml tags.

The resulting swf is super-lightweight (the demo below is 37k) and fast. Of course, the razor framework has only a fraction of the features of the Flex framework, so I'm not advocating it as a total replacement; but you might find it useful for certain applications.

Read the rest of this entry »

Posted by Ash on December 23rd, 2009

Filed under Actionscript | 6 Comments »

Razor components now on github, new license.


Its been a long time since the last update, but I recently uploaded the latest version of the Razor component framework to github, ditched the old wiki and set up a new home page.

You can find more information, download the source and see a demo application here.

I recently changed the license from GPL (which was a dumb move anyway) to MIT. So now you are free to do what you want with the framework as long as the source retains the copyright and license header.

If you need to contact me for any reason, you can shoot off an email to ash (at) razorberry (dot) com. You're also free to fork the source on github and send me any patches you write and I'll see if I can merge them :)

There may be some API inconsistencies or old examples in the asdocs, which I will be updating as soon as I can. I also plan to write a better guide/tutorial asap, but for now your best bet is to look over the sample application and check out the asdocs.


Posted by Ash on December 17th, 2009

Filed under Actionscript | No Comments »

MAX thoughts


MAX North America finished over a week ago, and I have to say, it was an invaluable experience. If you ever have the chance to convince your boss to let you go, I would definitely recommend it. If not for the stuff you might learn or pick up in the sessions or labs, but for the social aspect.
I was particularly happy to get to meet some of the developers I worked with at Schematic, including one or two I had never met in person (the joys of telecommuting).
The other aspect that I also find valuable is the fact that I often get inspired to create new stuff, or push the boundaries of what I'm doing. Seeing the excellent work that your peers get up to is a great way to get yourself motivated.. either in your real job (the stuff you get paid for), or all those pet projects you might work on at home.

My favourite sessions from this conference included Mario Klingemann's session on pixels, where he showed some pretty cool stuff on how to read QR codes from a webcam. It may have been a bit technical if you're not a nerd like me, but seeing his step by step development approach was really interesting. The shape detection part of the talk also drew an applause from the crowd as a perspective mapped Quasimondo logo appeared on a square of paper held in front of the camera. That's pretty much one-step-away from projecting a 3d model on there.
I caught Mario's Flash Forward talk on generative art last year, which was also a don't-miss session.

Another fun session was of course Andre Michelle's audio processing talk, where we got a quick demo of his hobnox mixing skills.

The Flex Architecture face-off session was also really interesting. A high level discussion/argument regarding the various Flex mini-architectures such as Cairngorm. The general consensus was that they often over complicate things, but are good for standardizing code and patterns when you are working in a large team. I particularly enjoyed listening to peoples experiences, both on the panel, and from the audience.

Ryan Taylor's talk on Pixel Bender brought some insights into the kind of processing you can do with the pixel bender toolkit. Even allowing you to run certain blocks of math in a separate thread from flash player. Certainly something to look into.

On the last day, I attended the session on Alchemy, the prototype toolchain for compiling non-system-specific C code into a low level AS3 bytecode. It looks really interesting for speeding up certain types of processing operations. The converted "C code" runs in its own asynchronous class. Someone has already compiled Doom to run inside flash player 10. Personally, I would be really interested to see if something like the C-based Box2D library can be ported and provided with an AS3 front-end, and then the speed compared with Box2DAS3.

Finally, the highlight of the conference for me was the Adobe customer appreciation event at the California Science Academy. What can I say, I'm easily bought by free beer, musicians, contortionists, and a planetarium show... ok, mostly the free beer.

Thanks to all the cool people that decided to hang out with me (or weren't smart enough to ditch me).

Posted by Ash on November 28th, 2008

Filed under General | 2 Comments »

World of Cars


Friend and ex-colleague Jon Ross directed me towards his team's latest achievement, World of Cars.
World of cars snapshot

Based on the movie Cars, its a pretty cool 3D racing game and car customizer done in Flash.
Jon tells me they used their own proprietary 3D engine, along with an isometric scrolling tile engine for the game itself. I particularly like the ability to tweak the vertices of the car model in the garage.

Check it out!

Posted by Ash on October 7th, 2008

Filed under General | 3 Comments »

AS3: Removing duplicates from an array


Just for shiggles (yes, I said it.), removing duplicate items from an array in one line of ActionScript 3:

var arr:Array = ["a","b","b","c","b","d","c"];

var z:Array = arr.filter(function (a:*,b:int,c:Array):Boolean { return ((z ? z : z = new Array()).indexOf(a) >= 0 ? false : (z.push(a) >= 0)); }, this);


Posted by Ash on September 3rd, 2008

Filed under Actionscript | 11 Comments »

AIR in Action - Now in stores!


AIR in Action cover

I'm super-pleased to say that Adobe AIR in Action is now available in all good bookstores (those that don't have it aren't good bookstores.. I'm looking at you, Boston Prudential Center's Barnes & Noble).

I had a fantastic time contributing my chapters for this book, and even though I may be biased, I think it is a great guide for learning all the features of AIR, and how to apply them in real applications.

I have to say big thanks to everyone who provided their input, including the reviewers. Also high-fives to the other authors, Joey, Sam and Kathryn. I really hope to get the chance to work with them again.

Anyway, click this link (UK) for the amazon page. Or you can buy the newfangled ebook from Manning.

Click here for the table of contents.

Posted by Ash on August 17th, 2008

Filed under General | 5 Comments »

Tiny audio streamer


I found this javascript-controlled audio streamer I made a while ago. It weighs in at a massive 1.2k and is very basic. Maybe you could make it a personal challenge to make it smaller!

Download the swf here. (right click & save).

Source (AS2):

How to use:
Basically you need to embed the swf at whatever size you would like the progress bar to be.
Then play or stop an mp3 using javascript calls playAudio(url); and stopAudio();.


<script language="javascript">
function thisMovie(movieName) {
    if (navigator.appName.indexOf("Microsoft") != -1) {
        return window[movieName];
    } else {
        return document[movieName];
function playAudio() {
  // 'AudioStreamer' is the id of the embedded swf
function stopAudio() {

Posted by Ash on June 6th, 2008

Filed under General | 1 Comment »

Messing around with papervision again


Nothing too spectacular, but I threw together a new pointless animation for my front page.

See it here.

One day I will have enough varied content to warrant a menu or something.

Here is the source, for learning purposes. It won't compile without a couple of files, but you can get the idea :)

Posted by Ash on June 5th, 2008

Filed under Actionscript | 3 Comments »