The situation: I've got a ViewStack
with 2 children (both of type Panel
).
The application starts with child 1 as the SelectedChild
.
With a click on a button, child 2 is the SelectedChild. After that, I return to child 1 being the SelectedChild.
When I click Show Redraw Regions
in the Flash Player, I can see child 2 being redrawn the whole time (i've got some moving objects in child 2). How can I prevent this from happening? Or can this only be done with actually removing the invisible (in this case child 2) child?
Why I want to achieve this? Child 2 will contain pretty much data (flv's, images, etc.) and when it's being cached like what happens now, it will slow down my application.
I've figured it out: the only way seems to actually remove the child, or it's moving/animated content.
Calling
video.stop()
,animation.stop()
like Amarghosh mentioned should help too.