Listed for FlexEvent.CREATION_COMPLETE. Start any timers once it's created. If components are being removed, then you already know when it's not being shown.
Hi drkstr 1,
Thank your reply, a components is not shown on screen include more case as I know:
1. In basic layout, top z component can cover other component
2. component's visible property
4. viewstack change(I'm not sure whether viewstack implements child switch by visible)
5. be removed from container.
You solution just can resolve the 5th case.
BTW, how can I know a component is being removed?
Maybe some combination of getVisibleRect and getVisibleApplicationRect
Hi Flex harUI,
Thank your reply, I do some testing follow your hint.
Unfortunately, it does not work. the two rectangle never change when vs switch child.
I think the UIComponent.getVisibleRect() function's visible just mean: "whatever the component's current status(is or not shown in screen) , it always return the rectangle of itself in the stage. Here visible is relative to rotation, out-stage"
Thank your provide the idea.
So add a check for visible=false. There is one in the FocusManager code.