Archive for February, 2008

Flex 4.0

Monday, February 25th, 2008

Now Flex 3.0 is officially released, I guess a lot or you like me will be waiting to get your hands on Flex 4.0. You can keep an eye on what’s going on with Flex 4.0 here.

London Flash Platform User Group – Thermo Special

Tuesday, February 19th, 2008

With the Thermo team in town it sounded like a great idea to get them down to LFPUG for an evening, even though it is all a little short notice.

Steven Heintz, Ethan Eismann & Rob Adams are all in town, and will do a short introduction to Thermo before opening up the floor to explore issues in more detail.

If your a current Flex developer/designer or a designer looking to get involved with Flex, this is your chance to put forward ideas on this upcoming Adobe product aimed at making it easy for designers to create rich Internet application UIs.

Come and see how your future workflow could be changing!

Sponsored by friends of ED

Adobe Special – 21st February 2008 (21/02/2008)

London Flash Platform User Group February 2008

Monday, February 18th, 2008

Big thanks to Paddy and Rob for last months presentations (videos, presentations and examples files can be found here).

This month we have Iain Lobb from Bloc doing a session titled ‘Successful Flash Games’, and up after him will be Richard Lord, creator of the particle engine Flint doing a session on ‘Practical Particle Effects with Flint’.

This months event is sponsored by friends of ED

London Flash Platform 28th February 2008 (28/02/2008).


Thursday, February 14th, 2008

When creating the default styles on a component you need to know the name of the class you are inside. The most common way of creating default styles is to use a static initializer.

	import mx.core.UIComponent;
	import mx.styles.CSSStyleDeclaration;
	import mx.styles.StyleManager;
	public class MyFlexComponent extends UIComponent
		public function MyFlexComponent()
		private static var defaultStylesSet                : Boolean = setDefaultStyles();
		 *  @private
		private static function setDefaultStyles():Boolean
			var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration( "MyFlexComponent" );
			 if( !style )
		        	style = new CSSStyleDeclaration();
		        	StyleManager.setStyleDeclaration( "MyFlexComponent", style, true );
			if( style.defaultFactory == null )
	        		style.defaultFactory = function():void
					this.style0 = "style0";
	            			this.style1 = "style1";
	        	return true;

This works fine, but it can be a problem if you refactor the class and change the class name as the string that is used in the above example won’t be updated. We’ve stumbled across this a few times and so our solution has been to write a method to take care of this class name for us.


PairedStackEffect (Fade & Squash)

Wednesday, February 13th, 2008

Effects are a very powerful part Flex and shouldn’t be knocked, but they are limiting when each effect knows nothing of other effects taking place.

PairedStackEffect is a core class for effects to be used with ViewStack’s or any class that extends a ViewStack. It enables you to create an effect where 2 children can be used at the same time.

I works by doing pretty much nothing on the ‘hide’, and doing the complete transition in the ‘show’.

I plan to go through PairedStackEffect in more detail and the classes that PairedStackEffect uses over the next week or so to try and make it as clear as possible how you can create your own effects extending PairedStackEffect. I might even bore some more people to death at LFPUG rambling on about ActionScript. I’ll also be updating the PV3DEffects to use Great White and these core base classes.

For now here’s an example with 2 effects we have knocked up, Fade and Squash. Fade fades up the alpha of the newly selected child, on top of the previous child and Squash squashes the previous child out of the frame from the specified direction.

PairedStackEffectExample (right click for source).

Yahoo! Maps AS 3.0 API

Monday, February 11th, 2008

All this talk about MS buying out Yahoo had a few people thinking Yahoo have already started to turn their backs on the Flash Platform, then along comes a Yahoo! Maps for ActionScript 3.0.

The all-new Yahoo! Maps component for Flex 3 enables you to add a map to a wide-range of web and desktop applications. Included in the API is support for other Yahoo! APIs including the geocoder, local search and traffic APIs along with an advanced marker and overlay manager to allow you to easily represent data on the map.

More info at

MirroredBox, HMirroredBox & VMirroredBox

Friday, February 1st, 2008

The other day John was asking me about getting children to lay themselves out in the opposite direction when added to a HBox.

I created a MirroredBoxLayout that extended BoxLayout and just reversed the order of the for loop that was used to position the children, both for vertical and horizontal layout. This is then used as the layoutObject in MirroredBox, which extends Box. HMirroredBox and VMirroredBox both extend MirroredBox, as you would expect.

MirroredBoxExample (right click for source).

Obviously you could just reverse the order you add the children in, or add them at a specific index, but if your comparing these to other arrays, or properties in these with other properties in other arraya you’d have to reverse those to. The MirroredBox’s keep everything in the order you would expect, but just lays them out in the opposite order. Anyway someone may find it useful, as John did ;) .

Note in our Google Code Library these have been replaced with ReverseBox, HReverseBox , VReverseBox & ReverseBoxLayout