Apr 15 2010

AS3 UI Components

AS3 UI Components

I’ve been using these user interface components for a few years now, tweaking them as projects come and go. Click on the image above or here to see a working example of my ToggleButtonBase, ButtonBase, SliderBase, ToolTipBase and ScrollBase AS3 classes.

ButtonBase is a multistate button that works by extending a MovieClip in the Flash library with ButtonBase.as as the base class. It means the various visual states are controlled on the IDE timeline (see the gratuitous green button).

ToggleButtonBase uses two instances of ButtonBase and dispatches ToggleEvents when the user changes it’s state.

SliderBase dispatches SliderEvents which contain a ‘value’ property that changes from 0-1 as the user drags the slider from left to right.

ScrollBase takes various display objects (background sprites, content display object, and 2 or 3 ButtonBase instances) to create a vertical content scroller. See ComponentTestDoc.as for examples of how to do this.

The source files are zipped here if you want to have  a poke around (Flash CS4).


Mar 9 2010

Cellular Automata – Web Cam

Cellular Automata - Web Cam

Michael suggested using a source image as the starting point for the automata. I tried that out and then tried using the source from a webcam instead. This is the result. You’ll need to allow webcam access :) The un optimised swf is coming in at 3k.

Here is the scrolling version.


Mar 5 2010

Cellular Automaton Burbling

Cellular Voices

I’ve been meaning to use the Flash Player 10 sound generation for something for a while. I thought I’d give my cellular automata voices.
Psychadelic visuals and morse code like twitterings are the result.


Mar 5 2010

Conway’s Game of Life

Cellular Automata

Sometimes its fun just to type “var bmd : BitmapData = new BitmapData(300,250);” and see where it takes you. This morning I went from this weird maze thing:

Cellular Automata - Maze

And ended up at Conway’s game of life. I could watch this thing run for hours…

Conway's Game of Life

I also scrolled the bmd to see what would happen. You sometimes get these lovely particle emitters that look like rocket engines or space invaders. (Click to restart the swfs).

Conway's Game of Life - Emitter

Source .fla here. Cellular automata are a branch of artificial life.

Artificial life (commonly Alife or alife) is a field of study and an associated art form which examine systems related to life, its processes, and its evolution through simulations usingcomputer modelsrobotics, and biochemistry.” – According to Wikipedia.


Mar 3 2010

Adobe AIR – Phone List

AR AIR Gadget

Working in advertising its sometimes nice to make something that is useful for a change. I made this AIR app as a part of the R&D initiative at Republic. Its installed on the work computers and could one day replace our paper phone lists, saving the world one A4 sheet at a time baby.

AR AIR Gadget

Its fed by xml and I included a few extra features, a list of the latest songs scrobbled on the public music pc and a multiuser chat panel (using SmartFoxServer).

AR AIR Gadget - LastFM