Something Wrong with the System

A Flash/Actionscript blog

Colour Swarm – Contest Entry

I was recently invited to participate in FXpression 09.  A flash contest on  The contest rules state that all entries must be composed entirely of circles.

I entered a modified version of my swarm code.  See it in all it’s glory after the break.

Read the rest of this entry »

January 19th, 2009 by Peter Organa

Mega Swarm + AS3 optimizations

I’m still working on the flocking code I blogged about earlier.

I wanted to get more flock objects on screen.  But my nearest neighbour detection code was VERY SLOW.  In the old version each flock object would do a closest neighbor check by for looping through EVERY OTHER ENTITY on screen.  The number of calculations would increase exponentially as the number of flock entities increased.  This set a limit of about 200 entities before things started to slow down.

So I decided to add a broad level distance detection level.  My first attempt got me up to about 700, before things started to slow down.  Which was not bad but I was sure I could do better.  At this point my friend William stepped in and essentially re-wrote my code 3 times over (William is a math major, and a super smart guy).  One of his broad hit level schemes let me get up to 2000 entites on screen at once (on my home computer). The version I posted here shows 1200.

See the mega swarm in action after the break.

Read the rest of this entry »

January 18th, 2009 by Peter Organa

Swarm (nicer)

Hey guys, I made a prettier version of the Swarm app I posted yesterday.

Check it out after the break.

Read the rest of this entry »

January 8th, 2009 by Peter Organa

The Swarm

Recently I watched a video on In the video Steven Strogatz talks about sync, in one segment he speaks about flocking behavior and lists the three simple rules that govern flocking.  Later I found that this type of artificial flocking behaviour can be referred to as ‘Boids‘.

So yeah… I decided to code it up in Flash ActionScript 3.0.

The image on the left doesn’t really do the app justice.
Click more to see the app in action.

Read the rest of this entry »

January 7th, 2009 by Peter Organa

I’m now 29 (old)!


I  want to thank all the people who showed up for my birthday party last saturday.

I had a great time, and I was drunk enough to believe you were all having fun too!

A special thanks goes out to Ron for the dead astronauts drawn onto Dark Side of the Moon!

Also, I’d like to announce that Boom Blox is a great party game for the Wii!

December 10th, 2008 by Peter Organa
Posted in Not Programming | Comments Off

Doom in Actionscript CRAZY!

Recently saw this link on BoingBoing.

Some fellas used Adobe’s Alchemy
(this is the first I’ve heard of it) to compile Dooms C++ code directly to Actionscript.

The frame rate isn’t all that great, but I’m still incredibly impressed with Adobe for coming up with all this crazy stuff and the Newgrounds crew for getting it to work.

Click to see Doom in a Browser (FP 10 required)

November 29th, 2008 by Peter Organa
Posted in Programming | Comments Off


FIRE!  ImageRecently I had some time to goof off at work and I wanted something quick and dirty to play with. So I tried to generate a flame using Perlin noise.

Now I know a ton of people have already done this kind of stuff.  But I wanted to give it a shot myself.  I don’t think my attempt is half bad either.

Really this is just a Perlin noise field in a bitmap being scrolled and blurred on 3 layers.  Sorta simple… kind of :D

The source code is super messy and not very edit friendly, but you’re welcome to it if you want it:

Click to download Source

You can see the swf in action after the break.

Read the rest of this entry »

November 24th, 2008 by Peter Organa
Posted in AS3, Programming, Source Code | Comments Off

My first published attempt at Box2D

ImageWell, I said I was working on Box2d and indeed I am.

Over the past week I’ve been working on this for my birthday invite (turning 29! Terror!).

I’m using computeSpectrum to read in the music (by Aphex Twin).  The melody controls the frequency and size of the circles.  The beat brings in the red squares.  It looks better running so please don’t judge it by the image.

You can see the Application in action after the break.

Read the rest of this entry »

November 24th, 2008 by Peter Organa
Posted in AS3, Programming, Super Cool | Comments Off

AIR Mac & PC listeners

Hey, just putting the word out in case anyone else is having similar problems.

I was playing with AIR AS3/Flash recently and ran into some serious headaches while listening for the closing event.

Eventually I discovered that Mac and PC have to listen for two different events… sigh. Or so I believe, I don’t have a Mac to test on.

PC Listener:

stage.nativeWindow.addEventListener(Event.CLOSING, onClosing);

Mac Listener:

NativeApplication.nativeApplication.addEventListener(Event.CLOSING, onClosing);

I’m new to AIR so if I’ve seriously misunderstood something fundamental please email me at:

August 25th, 2008 by Peter Organa
Posted in Programming | Comments Off

I made this! Rose Recommends by McCain

Rose Recommends ShotHey! I haven’t posted for a while!   I was working on a huge project for McCain foods.

Now that it’s done I can share it!

The project is called ‘Rose Recommends’. It allows the user to plan out their meals for the week.  More importantly the application will show the nutritional information for each food item and the plate as a whole.  Now you can finally find out precisely how bad eating a plate full of Cottage Cheese is for you.

I spent a pretty exciting/stressful month working on this app, I hope you like it.

If you have any questions/comments feel free to post them down below.

I’ll try to get some experimental stuff up again soom.  I just need to enjoy the summer a bit first.  It’s almost gone!

Click to see the app!

July 24th, 2008 by Peter Organa
Posted in AS3, Not Programming, Programming, Super Cool | Comments Off