This content has been marked as final. Show 2 replies
First off, Fade and Dissolve are two different things. I think you want to use Fade for both or Dissolve for both. But that's just a matter of taste.
You didn't supply your state details, but I'm betting you have an AddChild in there.
What's happening is the when you go from UserDetail state back to the base state, Flex is first going to make the content of the state be correct - this means undoing the AddChild and thus the contents of the UserDetail state just pops away.
Change your closeDetail transition to this:
<mx:Transition fromState="UserDetail" toState="">
<mx:Fade ... />
You want the events to happen in sequence: first fade out csUserDetail, then remove it. Since the Fade and RemoveChildAction apply to csUserDetail you can just put the target on the Sequence and leave it off of the Fade and RemoveChildAction tags (or you can put it on both of them if you have other targets).
Thank you Peter!
It worked. I don't understand exacly what is happening because I would think that you first had to call removeChildAction and dissolve (of fade) to overcome that Flex first makes the content of the state correct, but it works and that what I wanted.
By the way use both Dissolve and not fade :-). I just used 'fade' to explain my problem (sorry for my bad enlish :-)