You can call removeChild to remove the ViewStack children.
On 8/2/10 3:34 PM, "Ivan" wrote:
Hi everyone,
I've come across a situation where I have to create a different type of wizards
where each type have different screens in it.
Say for project of type A, you have Screen 1, Screen 2 and Screen 3 in the
wizard and for project of type B, you have Screen 1, Screen 4 and Screen 5.
The issue here is that I would like to destroy the view in the view stack that
are not needed, i.e.
Say I just create a project of type A, where the ViewStack contains Screen 1,
Screen 2 and Screen 3.
Then I want to create project of type B, I would like to then be able to
destroy Screen 2 and Screen 3 from the view stack memory.
Is there a way to do that? The creationPolicy of "auto" seems to only delay
the creation of the components in a ViewStack to when they are viewed, but it
doesn't destroy them when they are no longer needed.
Any idea would be appreciated.
Many thanks in advance.
Ivan.
--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui