Archive for

Prototyping: ActionScript’s best kept secret.

As a developer, once in a while  you discover something new that makes you go  ”How come nobody ever told me about this and why do I only find this out NOW ? ”  Last year, when I discovered that a Function in AS3 is also a class and can be used as a a [...]

Blitting a Particle transition between two images.

Sometimes when you are experimenting around with flash, you’ll notice that things can get a little laggy when you put too many things on the stage and try to move them around at the same time. The Display List is a very fast and easy way to handle the way things are displayed on the [...]

More fun with Azoth: “Sierpinski Yourself”

You need a webcam to enjoy this blogpost to the fullest This post is a brief addendum of my previous post about Azoth. I was so excited about Azoth’s performance in my previous post that I didn’t take enough time to come up with a more practical example. Like I said last time, ByteArray operations [...]

Supercharge your ByteArray operations using Azoth

(edit: take a look at my next blogpost for more fun with Azoth !) I recently came across an interesting use of Adobe’s Alchemy technology. Basically what Alchemy allows you to do is run compiled c/c++ code inside of the ActionScript Virtual Machine. This in turn allows you to implement low-level optimizations that can lead [...]

Flash Packager for iPhone: Using the Geolocation class

Prerequisites: – an iOS device. – Flash professional CS5 – an iPhone dev. license/certificate that allows you to package flash and deploy on iOs. After playing around with the flash packager for iPhone that ships with Flash CS5, I thought I’d share some information about one of the most interesting aspects of mobile development: Location [...]

drawing a perfect circle with the curveTo function.

I’m guessing most of you already know what the graphics.curveTo function is. As the name suggests, it allows you to draw a curved line that starts at a certain point, bends towards a control point, and ends in an anchor point. The starting point of the curve can be defined in three ways: undefined: the [...]

the Monty Hall problem: A programmer’s approach

I’ve always enjoyed mindgames, but there was always one riddle that I just couldn’t wrap my head around. You may or may not have heard about the Monty Hall problem: Suppose you’re on a game show, and you’re given the choice of three doors: Behind one door is a sportscar; behind the others, goats. You [...]

estimating the duration of a Sound Object while loading.

In case you never used the Sound class before, let me give you a brief introduction. The Sound class is found in the flash.media package and is used (hard not to be obvious here) for playing sounds. The constructor for the Sound class has 2 optional parameters: stream:URLRequest = new URLRequest(“url:String“); context:SoundLoaderContext = new SoundLoaderContext(“buffertime:Number” [...]

optimizing the floodFill() method

If you ever used the floodFill() method that is provided in the AS3 BitmapData class, you know that it doesn’t always act like it’s supposed to. For those of you unfamiliar with it, the The floodFill() method is similar to the paint bucket tool in various paint programs. The signature of the method looks like [...]