I want users to be able to locate objects ,say rectangles, freely on the screen. Each Rectangle will have width, height, x, y.
I want that when users resize browser window, the rectangles change location and size relative to the window while maintaining proportion.
I noticed I could do something width=”20%” height=”20%” and then object will resize but if the aspect ration is diffenent the rectangles will look distorted. Also I wasn’t sure what’s the best way to locate object relatively as I noticed I couldn’t bind Flexglobals.toplevelapplication.width/Flexglobals.toplevelapplication.height to x/y.
Basically, you want to override updateDisplayList() and resize your retangles in that. UpdateDisplayList() will give you the height and width of the container which you can use to recalculate size and position of the rectangles.
You may benefit from reading up on the Flex Component LifeCycle.