finding information on Flex 3 component lifecycle

Quickly creating re-usable components based on others, augmented with additional ActionScript behaviour using MXML is as simple as can be. However, to create a component from scratch using ActionScript requires a lot of detailed knowledge of how the Flex framework works and the component life-cycle in particular.

The Flex documentation attempts to describe the lifecycle, but can leave the developer with lots of unanswered questions. When I got more involved in developing components I found chapter 19 of Programming Flex 3 good for filling in the gaps.

This week a new and free paper has been published by DevelopmentArc that also explores the component life-cycle and the application life-cycle. A very well worth while read….

Understanding the Adobe Flex® 3 Component and Framework Lifecycle

Feel free to post links to other compent lifecycle resrouces in the comments.

SimpleOscilloscope : filter update

My SimpleOscilloscope component described in an earlier post has now been updated to include a few filters controllable through setting styles. Of course like any other Flex component, it can have additional filtering applied in the normal way. I just felt like including these : alphaDecay, redMultiplier, greenMultiplier, blueMultiplier, blurX, blurY, scrollX, scrollY.

As ever, the project is on google code, and the test bed is here.

SimpleOscilloscope snapshot - with filters

flash.display.BitmapData gotcha – well gotme for a while

The documentation is correct, so i have no excuse, but I didn’t initially read much beyond the signature of the constructor…

public function BitmapData(width:int, height:int, transparent:Boolean = true, fillColor:uint = 0xFFFFFFFF)

I needed a transparent bitmap. Reading the default “transparent:Boolean = true”, I assumed by simply supplying width and height, a transparent bitmap is what I would get. Not so! I got a white rectangle. The reason being, that the default fill colour is 100% white. (The first pair of FFs representing the alpha in ARGB).

At first it would seem slightly unintuitive for the second default to conflict with the first, until one realises that the ‘transparent’ flag is there to indicate whether the object will support transparency or not. Not to state that it should be initially created transparent. Supporting transparency increases data size from 24 bits per pixel to 32 bits per pixel.

So what i should have done :

bmd = new BitmapData( width, height, true, 0 );

couple of user group events (LFPUG)

26 March 2009

Looking forward to this slight departue from the usual subjects at LFPUG into the world of iPhone/iPodTouch development.  I have my development kit but not got around to using it yet…

  • An Introduction to iPhone Application Development
  • iPhone Development for Web Developers

30 April 2009

Some interesting 3D flash stuff. I have prior engagement to see Ultravox for the first time since 1986 which will keep me away from this one. So I will be relying on the video recording of the session.

  • Papervision3D, Simplified
  • We Make. You Enjoy

SimpleOscilloscope : my first opensource Flex component

In the majority of my projects to-date, I am the sole developer on the project team. I was feeling the need to get into writing Flex components to a level that they could be distributed. Essentially making sure I use meta tags correctly and adding appropriate asdoc comments allowing other Flex developers to easily include the component as they would any other from the Flex SDK.

SimpleOscilloscope snapshot

So, ccglib is an MIT license OpenSource project hosted on google code through which i plan to release a number of components. The first component released is SimpleOscilloscope, which plots the currently playing sound-wave. Designed to be easily sized, coloured and positioned through application of styles.

coach tool in flex / air

Coach Tool snippet Finally got around to adding a case-study to my corporate site including a screen-cast of some of the features of my longest running project, a Flex/AIR application for communicating football moves and plays. Essentially a digital, animated version of a football tactic board.

More details and the screen-cast are on the creative-cognition case-study page.

apple security update 2009-001 breaking PowerPC apps ?

Since installing this update I observe on my intel based mac that two PowerPC based apps now crash immediately on launch. Logging “Exited abnormally: Illegal instruction” to the console. The two applications affected so far on my system are CanoScan Toolkit X and more importantly Retrospect. Unfortunately the installers for both applications also fail with the same error. I worked around the canon issue by installing the LiDE 35 driver (for my LiDE 50) – then using “Import image…” in Preview. However not found a workaround for Retrospect yet. Looks to me like Rosetta is not working properly, although I have one PowerPC process running “RetroRun”.

Annoying and scary for my backups to be crippled in this way. Investigating. Not sure it was the security update as yet, only ‘evidence’ being the timing of the failures.

Update: Solved…

The following typed into terminal, followed by a re-start fixed the problem…

sudo update_prebinding -root / -force

As per instructions by Charles Minow in this thread on the Apple support discussions.