Archive for October, 2009

UITintedMovieClip

Wednesday, October 28th, 2009

Recently the subject of tinting skins created for Flex has cropped up a couple of times.

Here’s a little class I threw together that enables this from Flash. Instead of extending UIMovieClip you can extend UITintedMovieClip. This new class will look for a style set on your Application class named skin-tint.

In Flash you then create all your skins in greyscale and the class then uses ColorTransform to tint itself.

UITintedMovieClipExample (right click for source).

This class only handles tinting of one color, but its feasible if the skin creator used MovieClips inside the skins with a defined naming convention, different tints could be applied to different instances.

I’ve also added the class to our Google Code repository.

London Flash Platform User Group October 2009

Thursday, October 15th, 2009

Many thanks to Mark Anders who hung around after Flash on the Beach last month to come down to LFPUG and present some of the stuff Adobe are working on. As usual you can find his video in the presentations section.

This month we are concentrating on design patterns and frameworks and I believe we have 2 great talks lined up. First up Eamonn Faherty doing a session on ‘Practical Design Patterns for ActionScript 3.0′ and following him Richard Lord is back (its been a while since we’ve seen him) with a session on ‘Application Frameworks: The Good, the Bad & the Ugly’.

London Flash Platform User Group 29th October 2009 (29/10/2009)

Using Repeaters in ViewStacks

Friday, October 9th, 2009

Its very rarely I use Repeaters. I always thought of them as a way to get a list of items on the screen, yet they would always create all the items, therefore not being as optimized as a List that only creates just enough renderers, and re-uses them.

Recently on a job I required the children of a ViewStack to be driven by a dataProvider. The ViewStack required the same number of children as the number of items in the dataProvider. Each child should use its corresponding item in the dataprovdier to render its content, set via the data property.

I knew this could be handled with ActionScript, but ideally wanted a component that took care of it internally. To achieve this I built something called a DataStack, that had a dataProvider property. This worked fine but a couple of days later when building a custom container for tiling items I realized I’d been wasting my time, and a Repeater inside a ViewStack would have done the job I wanted.

What a donkey I am sometimes!

For good measure in the this example I added one of the new Efflex effects.