Alphabet Particle Emitter

Ok, so there’s not much to say here!

I’m no mathematician, but I’ve been working on putting together a simple particle engine which harnesses the awesome power of Actionscript 3. Read : Alphabet Particles AS3 »

Posted on 28 Apr 2008
8 Trackbacks

Playing with APEs

Look at them go! Stupid primates.
Click ‘Spawn Platforms’ for a new layout, or play with the Platform and APE count steppers!

I finally found some time to play around with the AS3 physics engine, APE; something I have been meaning to do for a while now. Read : Playing With APEs »

Posted on 24 Nov 2007
3 Trackbacks

AS3 Group94 Style Menu

Welcome to the latest instalment of the Group 94 style scrolling menu tutorial! (With downloadable source files of course) Read : AS3 Group94 Menu »

Posted on 24 Oct 2007
1 Trackbacks

Group94 Circular Menu
Download: AS2 Group94 Circular Menu

I built this circular version of the group94 style scrolling menu for a flash website awards showcase I was asked to work on. The original design was based around circles, but we ended up redesigning as parts of the interface (not this menu!) were too processor intensive.

Ok, so part two of my tribute to Group 94’s menu system! This is again inspired by the Group 94 (at least they are most famous for it) shuffle menu in Flash, which pushes items off the top and bottom as the menu shuffles into place. Read : G94 Circular Menu »

Posted on 07 Aug 2007
Posted in
2 Trackbacks

array_count_values in Actionscript

In PHP there is a very useful function called array_count_values. It sorts an array by returning a 2 dimensional array consisting of non duplicate elements as keys, and values determined by how many times these elements appeared in the original array.

update 09.10.10

This can be achieved (in AS2 and AS3) in a much simpler manner, using the following function or prototype:

Array.prototype.countValues = function() : Array
	var i, j = -1, c, o = {}, r = [], v, n = a.length;
	for(i = 0;i < n;++i) (c = o[v = a[i]]) ? ++c[1] : r[int(++j)] = o[v] = [v,1];
	return r;

So, for example, an array [“red”,”green”,”blue”,”red”] would be converted into [“red” => 2, “green” =>1, “blue” => 1]. Duplicate elements are removed and the new array indicates how many times each, now unique value occurred in the array.

Unfortunately, Actionscript has no such function built in, so I made one. It is a modification of Senocular’s array.unique() prototype (which you can find in his Actionscript library), however rather than simply returning a unique array, it returns the 2 dimensional array mentioned above. Read : AS2 Array count values »

Posted on 20 Jun 2007
Posted in
0 Trackbacks

About me

Soulwire is a weblog by Justin Windle; a Senior Interactive Developer at Fi (Fantasy Interactive), Stockholm – I often Tweet, Flik, Link and Vim.

Warning: file_get_contents( [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 410 Gone in /home/soulwire/webapps/soulwire_blog/wp-content/themes/soulwire/functions.php on line 203