Why Objects Over Arrays?

I saw a tweet earlier today “there seems to be this obsession with turning everything into an object”. Here’s a detailed response as to why using objects instead of arrays is a good idea, in my opinion. The Problem I once took over a project written in ActionScript 3. It was a fairly simple project. Five mini-games…

Read More

SoundMixer + ByteArray

As I was writing a prototype for a voice-driven user interface, I ran into a wall. I was convinced that I could analyze a sound’s frequency spectrum with ActionScript 3. It turn out that the awesome SoundMixer.computeSpectrum(), which implements the Fast-Fourier Transformation, can only sample currently played sounds. It cannot be supplied a ByteArray, such…

Read More

Simplify camera parameters in pv3d

I’ve been supplied a 2D sketch of what my 3D world (PaperVision3D) will look like. The hardest part was matching the perspective by carefully positioning the camera. Having no other way than trial and error and a total of 7 different parameters, I quickly went nuts. This is a time consuming task: changing the values,…

Read More

When garbage collection does more than you want

I had an interesting Flex bug to solve a day before the project deadline. I was showing a progress bar while some images were preloading in the background. The application was only allowed to fire applicationComplete event once these images have finished loading. The client complained that the progress bar stalls the first time you run…

Read More

PaperVision3D and JigLib

I experiemented with PaperVision3D and JigLib last week. Since JigLib had a plugin specifically designed for PaperVision3D, making the two work together was a breeze. The only thing that really bothered me is the fact that when I applied a force on a body, it rolled instead of gliding smoothly along the surface. I’m used to…

Read More