Site search

Categories

January 2009
M T W T F S S
« Dec    
 1234
567891011
12131415161718
19202122232425
262728293031  

Friends

Bindable interfaces with custom events

I’m surprised I haven’t stumbled across this before, but it caused a little hiccup in recent development. If you have a class with a mixture of binding tags (i.e. with and without events), but you’re programming to the interface, then making it bindable is a little unintuitive. It seems binding in interfaces doesn’t quite follow the practice of binding in classes.

Imagine you have an class called Artist with two getter/setter properties: name and age. One of them uses a standard binding tag: [Bindable], the other uses a bindable tag with a custom event: [Bindable(event="artistAgeUpdate")]. Now you may be inclined to copy the tags into your interface and paste them above the getter/setter pair, like so:

Read more »

Quality Glow and Blur Flex effects

The Glow and Blur effects are useful tweens that can be used to animate flash filters in Flex, the only problem is they don’t implement the quality property. It’s hard coded at a value of 1. In most cases this isn’t an issue, and where performance is concerned it’s best left unchanged. But having the extra control doesn’t hurt, especially considering a quality of even 2 or 4 can dramatically increase the smoothness a filter.

Adding the quality property onto Flex effects is quite simple, although it does require overriding two of the effect classes and duplicating a small amount of code. Below is an example of the new glow effect and the steps required to implement it.

Read more »

Overlapping TabBar in Flex

On a recent project I needed an overlapping tab bar, something that the default Flex TabBar doesn’t implement. While you can can easily change the spacing between tabs using a negative horizontalGap, you cannot retain a top-of-the-pile-like status for the selected tab. They are permanently stacked left-to-right on top of each other.

There’s a solution out there that relies on clever skinning techniques, but it’s a little time-consuming and inflexible. So after some poking around inside the Flex framework I discovered the underlying problem and came up with an alternate solution.

Read more »

New blog for 2008

While on holiday I decided that what I should really do is start a new blog. Maybe the sun had addled my poor brain because in the past my reputation for keeping these things updated is abysmal. But eventually I came to the conclusion it would be good karma to share some of my Actionscript and Flex knowledge with the rest of the world.

Of course writing about something that hasn’t already been documented in obsessive detail by a fellow nerd is always hard, especially with the deluge of Actionscript blogs out there. But just maybe I can document a problem nobody’s encountered before, and someone, somewhere will benefit from what I type. And if it all goes wrong then I’ll just write about things I like.