Wednesday, July 29, 2009

Flex Layout Techniques - Part II

I am going to give you an important tip, for people who are new Flex/Flash Technology.

The scaleX and scaleY properites can take negative values as well...

//draw a box
var box:Sprite = new Sprite();
box.graphics.beginFill(0x000000);
box.graphics.drawRect(0,0,50,50);
box.graphics.endfil();

// reverses the box in the vertical direction
box.scaleY = -1;

// reverses the box in the horizontal direction
box.scaleX = -1;