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
54 Comments
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
Tagged
5 Comments
0 Trackbacks

A decent computer and lots of volume is recommended.

Well, due to the fear of slipping behind, I felt I better start learning the new Flash language, Actionscript 3, and at first glance, one of the coolest features is definitely the SoundMixer.computeSpectrum function. Read : AS3 Music Visualisation »

Posted on 14 May 2007
114 Comments
8 Trackbacks

Flash Dynamic Stacking Menu

Update: AS3 Version using TweenLite is available here

In this experiment, you can drag the boxes; when you release them the stack will shuffle to accommodate the dropped box.

I have recently been working on building an application in which I wanted to use Photoshop style ‘layers’ which the user could create, drag onto different depths and delete.

The basic idea was for the user to click and drag ‘layers’, and drop them in between others. This would cause the other layers to reposition to accommodate the new layer and to fill the gap which it had left in it’s old position. Get it? Read : Dynamic Stacking »

Posted on 13 Apr 2007
45 Comments
4 Trackbacks

Flash Liquid Layout Dynamic Positioning

Following another post regarding using stage listeners to dynamically resize and position MovieClips in Flash, I was asked to upload and FLA as an example. The previous code can just be pasted into the actions panel and will run without any MovieClips needed, and was designed to show the StageListener function rather than showcase a particular dynamic layout.

Download: Fluid Flash Layout Example Read : Dynamic Positioning Continued »

Posted on 08 Mar 2007
Posted in
Tagged
62 Comments
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(http://search.twitter.com/search.atom?q=from:soulwire&rpp=1) [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