Archive | June, 2009

Link: ToneMatrix

ToneMatrix

ToneMatrix, a labs experiment from one of the guys behind the Hobnox Audio Tool is… mesmirizing. The concept is simple – there’s a grid, and each block in the grid represents a specific tone.  An invisible playhead constantly loops across the grid and triggers the tones.  You toggle the blocks ‘on’ and ‘off’ with a mouse click.

Create your own patterns and fine-tune your melody, or draw pictures and see what they sound like – ToneMatrix can keep you occupied for quite a while.  Check it out!

Link: Creating a snazzy background in Flex 4

Peter deHaan has posted a cool example of the way things work in the new Flex 4 ‘Spark’ framework;

http://blog.flexexamples.com/2009/06/13/creating-a-fading-bitmap-fill-background-on-a-spark-panel-container-in-flex-4/

The aim of the new Spark components is to make it much easier to customise the appearance of standard Flex components – similar to the Degrafa project. If you’re interested in either of these, then I hope you’re already signed up for Flash Camp Birmingham, June 16th 2009 (tomorrow), as James Whittaker of RefreshingApps.com will be doing a session entitled “Skinning components with Degrafa & FXG” which should be interesting!

Flex Quick Tip: Printing an Objects’ contents

You quickly learn in Actionscript 3 that tracing an objects’ contents is not always that simple.  Commands such as trace(myObject); often yeild the highly infuriating [object Object] return, which tells you mostly nothing of what you actually wanted to know.  After that you can move on to more advanced trace logic, like the handy;

for(var i in n) {
    trace(i+":"+n[i]);
}

But that’s a lot of stuff to type, and often yeilds infuriatingly long stacks of parameter traces.

Flex can make things a little easier, with this useful utility class, the cunningly named ObjectUtil class.  Simply import the class (import mx.utils.ObjectUtil;) and call the following method; trace(ObjectUtil.toString(myObject)); and you’ll get a nice output of all the properties of your object.

Kudos to flextutor.org for this, in their original post “How to print an objects’ contents in Flex.”  I thought I’d repost it here though, not least because there seems to be an issue loading their site as I’ m writing this article.