Mailing List
Home
Flash Pro
Extending Flash
Flash Macromedia Developer
Subjects
Firework Effect
setInterval bug identified and fixed
setInterval bug identified and fixed
ScrollPane component doesn 't auto update
Help: MX 2004 How to script a print button to print the entire sli
Event Dispatcher between classes
memory management removeMovieClip /
MX2004 Dataset itemClassName
Order of events per frame
XML to Object help
Textfield prototype question
Flash and QuickTime VR
Reading and displaying RSS feeds in Flash MX
Flash MX 2004 Sucks
AW: [Flashcoders] Switch/Case vs If/else
AW: [Flashcoders] Switch/Case vs If/else
Flash Interface with 10mb xml file
Web Service Results
Listener Object 's best practice
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
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)