PDA

View Full Version : ViewStack's First Item's showHandler


chad
01-29-2007, 04:09 PM
I'm using a ViewStack which holds multiple components. Each component listens for the FlexEvent.SHOW event on the component and calls its respective showHandler function. Whenever I switch between components in the ViewStack the correct showHandler gets called. However, when the application first runs, the first component in the ViewStack doesn't call its showHandler function. To get past this in the past, I've created a simple object (mx:Spacer) as the first item in the ViewStack so that when I switched pages every showHandler would be called at the right time. Is there a better way to approach this problem?

hangalot
02-02-2007, 01:15 PM
you can use the viewstack's onshow or creation complete event