PDA

View Full Version : How to call one function after another is finished?


thomas4vw
05-09-2004, 06:08 PM
Hi all, greetings~ :)

I got two separate fuctions, (maingrid & unmaingrid)that would change the size of a movie clip and change its alpha.

Now, I got another function (opengrid) that would call these two functions, so that when i press a button, the functions mentioned above would be called one by one.

What doesn't work is that when I press the button, the (opengrid) would not call (unmaingrid) first and then call (maingrid).........

Can anyone help me with what's going on...??
:confused:

Thank you very much.

Yours,
Thomas

magicwand
05-09-2004, 06:43 PM
if (siz=1) to
if(siz==1)

thomas4vw
05-09-2004, 07:20 PM
Thanks magicwand! I know I would do something stupidly wrong with things like that... :p

However, after I changed that, The function (opengrid) still would not work... :(

Could someone help me out on this one....?

Thanks so much!!

I have attached the amended FLA...

magicwand
05-09-2004, 10:06 PM
question
what is wide?
i trace wide and i got undefined.
were did you define wide?

thomas4vw
05-09-2004, 10:29 PM
hm.....
i guess i didn't define it....

however, the idea is like this:

i plan to have 2 sizes of MCs, one that is narrower than the other, and that the "wide" would be a flag to show that which one is shown on the screen, so that when i call the (unmaingrid), i would know what size is the MC on screen, and can (unmaingrid) accordingly.

i will try to define it and see if it works.....

i am from Hong Kong and i am still struggling at explaining this in english....
sorry :(

thomas4vw
05-09-2004, 11:08 PM
actually is there a way to create a custom event for a movie? that would be very useful......

magicwand
05-10-2004, 02:21 AM
sounds eazy enough task.
but need more info :)
i goto sleep now bye..

thomas4vw
05-10-2004, 02:52 AM
i got it finally!!!
i added an empty while loop between the (unmaingrid) and (maingrid).
the while loop won't finish until (unmaingrid) is finished........

thomas4vw
05-10-2004, 10:56 AM
turn out it is not working........
i am so frustrated......
:(

magicwand
05-10-2004, 09:34 PM
if you tell me what wide is i might understand your code and try to help.
simple lesson:
somevar=false;
if ( !somevar ){
whatever;
}else{
whatever2;
}
it will never goto else because somevar is false;
!somevar is true when somevar is undefined or false;

hope it help;