Home > Flex development > Listening for Stage events in Flex

Listening for Stage events in Flex

July 16th, 2007 Randy

To access Stage events from a Flex app, the property “stage” is available to the application since it is inherited from DisplayObject. What the docs don’t explain is that the stage property is not available on “creationComplete” but is available on “applicationComplete”. My test was to resize a Flash-made-component’s width and height as the Stage resizes by using the resize Stage event. It worked but the performace was poor and the resizing didn’t keep up all the time; sometimes scroll bars would appear during testing. If I turn on Scale9 for the Flash-made-component and then place it in an HBox, set both to have 100% width and height, then the graphic scales well and keeps up with the browser resizes. This does not help me since I want to overlay graphics using an “absolute” layout where 100% width and height values are ignored.

Categories: Flex development Tags:
Comments are closed.