added Effects and removed Effects start almost together
I have run into a problem where I am removing a component and adding another one. I have set addedEffect and removedEffect for corresponding component.
But the addedEffect starts before the removedEffect completes.
How can i make them in order ??
I am doing this in actionscript.So, in this case i'm not using state and transition.
Any help would be really g开发者_如何学JAVAood.
Thanks.
You can move the code to add the next component into the Effect
completion handler for removing the first component. This will guarantee that nothing will get added until the previous component removing Effect
has finished.
[Edit]
Based on your question, I will assume you already know how to assign an Effect
to the desired component event (when removing in this case).
Make sure you declare the effect with an effectEnd
handler, for example
<s:Fade id="fader" effectEnd="effectEndHandler(event)"/>
Place the code to add the next component, in the function effectEndHandler
.
精彩评论