MAX thoughts

General

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).
:D

Posted by Ash on November 28th, 2008

Filed under General | 2 Comments »

World of Cars

General

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 | 2 Comments »

AS3: Removing duplicates from an array

Actionscript

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);

trace(z);

Posted by Ash on September 3rd, 2008

Filed under Actionscript | 10 Comments »

AIR in Action - Now in stores!

General

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

General

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):
Main.as
MiniStreamer.as

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();.

HTML:


<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
  thisMovie('AudioStreamer').playAudio('test.mp3');
}
function stopAudio() {
  thisMovie('AudioStreamer').stopAudio();
}
</script>

Posted by Ash on June 6th, 2008

Filed under General | 1 Comment »

Messing around with papervision again

Actionscript

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 »

Razor Component Trac now up and running

Hot

After a week of inserting asdoc comments, I uploaded the source to the Razor Component Framework to my public svn. The components also have a new project page, at:

http://www.razorberry.com/components/

The ticket system is open to submission as long as it doesn't get spammed, and I will also be adding more documentation and examples on the wiki over the coming weeks.

I'm always open to constructive criticism, so please feel free to email me (razor (at) razorberry.com) with your thoughts, just as long as your thoughts amount to more than "These suck!". But please also keep in mind that this is beta software, and I'm providing no warranties or guarantees of any kind :) .

As I mentioned in my last post. I still need to backport some features before releasing the as2 source, but the as3 source is all there.

Have fun!

Posted by Ash on April 22nd, 2008

Filed under Hot | 5 Comments »

Announcing the Razor Component Framework

General

Razor component framework

I've posted about the components I've been working on as a side project for a long while now. Finally, I'm just about ready to release them to the public in a beta state.

The Razor Component Framework is intended to be a lightweight, yet feature-rich alternative to the mx framework for Flash, Flex and AIR. It comes in both ActionScript 2 and 3 flavours while maintaining as consistent an API as possible.
Read the rest of this entry »

Posted by Ash on April 8th, 2008

Filed under General | 2 Comments »

AS3 Dynamic Speech Bubble Snippet

Actionscript

The static method drawSpeechBubble in the file below uses the drawing API to draw a rounded rectangle based speech bubble with a dynamic point. The side the point is on moves depending on the relative position to the bubble. It looks best if you set the point to be fairly close to the actual rectangle.

Usage:

AS:


SpeechBubble.drawSpeechBubble(target:Sprite, rect:Rectangle, cornerRadius:Number, point:Point)

// Example:
var g:Graphics = graphics;

var m:Matrix = new Matrix();
m.createGradientBox(200,100,90*Math.PI/180,80,80);
g.clear();
g.lineStyle(2,0x888888,1,true);
g.beginGradientFill(GradientType.LINEAR, [0xe0e0e0, 0xffffff], [1,1], [1,0xff],m);
SpeechBubble.drawSpeechBubble(this, new Rectangle(80,80,200,100), 20, new Point(120,300));
g.endFill();

Sample (move mouse to change point position):

Download:
SpeechBubble.as

Apologies for any code messiness! I'm aware that you can create a dent in the corner.. it's probably up to you to position the point sensibly so it doesn't screw up :)

Posted by Ash on January 28th, 2008

Filed under Actionscript | 17 Comments »

I am not Singularity..

Discussion

..until I find out what it is.

But kudos to Aral for his viral marketing strategy ;)

Posted by Ash on January 26th, 2008

Filed under Discussion | 1 Comment »