I just got busted for being wrong on a different question, but here goes anyway:
The Flash Player, from the viewpoint of AS code is essentially single threaded. So, in the example you posted, the execution runs sequentially througe each function. myFunctionTwo() will not run until myFunctionOne() completes Things that can change this are calls to external data, which are always asynchronous, a callLater(), perhaps some other cases as well. But normally, you can depend on linear execution of your code paths. Tracy ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Anderson Sent: Wednesday, April 02, 2008 7:54 PM To: [email protected] Subject: [flexcoders] Question on calling multiple Functions in sequence Hello All, I was wondering how things work, when calling multiple functions in sequence. For example, in this function: private function doThisFunction():void { myFunctionOne(); myFunctionTwo(); myFunctionThree(); } When I execute "doThisFunction", does it literally run the 3 functions "one-two-three", or does it execute the first function, waits for it to finish, then runs the second function, waits for it to finish, then finally runs the third function. How could "doThisFunction" possibly know when "myFunctionOne" even finishes? My end goal, is to create a way for a function (containing more functions within) to stop and wait for each function to "run & complete", before executing the next one. I know Events are used quite often when things must happen in a sequence, but when it comes to things like "Scaling or Sizing a Component", how could I possibly know when something like that finishes? Thanks in advance for any advice you can all throw my way :) Mike

