  | |  | how do I kill a function? | how do I kill a function?
2004-02-24 - By Gabino Travassos
Back Hello All
I have a function called wait1() that I invoke at frame 25 of my main
timeline. It is basically a listener to see whether the user has done
something and it loops until something happens. I have a "rewind " button
that when clicked takes the user to frame 19 to repeat the audio
instructions.
Problem is, my function seems to be persistent. When I go back to frame 19
instead of running what 's in there and going to frame 20 and playing the
audio I 'm back to 25 and looping...
Is there something like a function.die or .stop or something?
Do I have to put a variable inside my function?
Like if (stopFunction == "yes "){
// don 't run the function
}
and have my rewind button set stopFunction to "yes "?
And why is this so persistent?
function wait1(){
if((_root.slot3.filledByTile == " ")&&(_root.slot5.filledByTile == " "))
{ gotoAndPlay( "an1Done "); // go back
} else { gotoAndPlay( "an2bDone "); // go forward
}
}
TIA
Gabino
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Supported by Fig Leaf Software
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Be sure to check the archives and the wiki:
http://chattyfig.figleaf.com/
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:105092
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
To unsubscribe send a blank e-mail to:
Normal Mode: flashcoders-unsubscribe@(protected)
Digest Mode: flashcoders-digest-unsubscrive@(protected)
|
|
 |