When dealing with things inside the flash player - you need to deal with it
as if it was single threaded - because generally, it is. In your example,
the functions would be called in order, one after another...not all at the
same time as you may think so lets say you had an example like this
var myNumber:Number = 0;
private function doThisFunction():void{
myFunction1();
myFunction2();
myFunction3();
}
if function 1 added 10 to myNumber, function 2 multiplied it by 5, and
function 3 subtracted 12 - it would happen in that order exactly - and you
can count on that - so your final result would be 38
hope this helps
eric
On Wed, Apr 2, 2008 at 7:54 PM, Mike Anderson <[EMAIL PROTECTED]> wrote:
> 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
>
>