There is no waiting, yielding or other thread-like capabilities in Flash/Flex.
I guess I would consider making the each method a class that listens to a centralized notion of the current state of the world and reacts accordingly. ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Ljuba M Sent: Tuesday, April 01, 2008 3:45 PM To: [email protected] Subject: [flexcoders] Can you make a method wait for an animation to finish before continuing? What I'd like to be able to do is call a method which does some useful things, among which is to play an animation, then have the method continue on its way. The problem now is that the rest of the method keeps running before the animation has finished. I'd like the rest of the method to wait for the animation to finish before proceeding. I know that I could use a completeEvent listener method which contains the remainder of the function, but I'd like to implement the above-described behavior several times in a number of methods, so having a bunch of listeners all over the place which only contain the rest of the original methods would be really messy. Is there a way to make the rest of the method wait? Is there a completely different way to achieve the same goal that I'm totally missing? Any help would be great!

