PDA

View Full Version : clearing all variables


cheez
12-19-2002, 11:12 PM
Howdy, I want to use a pushbutton to reset my many-layer one-frame applet/MC. I could use the brute-force method and set-all my variables = ""; however I am sure I would forget some etc.

something like:

/////////////////////////////////////////////////
change handler onSelect

function onSelect(pushbutton) {

if (pushbutton.getValue == true) {

"reloadMovie ();"

or

"reset.all.variables();"

}

}
/////////////////////////////////////////////////

The same effect can be had if I load into html and use IE refresh.

Thanks for any suggestions.
-Cheez

jimburton
12-20-2002, 09:17 AM
you can use an init function that sets up all your variables in the first place then you just need to call that again...

cheez
12-21-2002, 12:38 AM
I like it.

Is there a command that can reset the whole movie in one wave of the hand? I suppose I could make my MC two frames long with most of the action happening in the 2nd frame where the first frame inits all the vars. Just have a quick gotoAndPlay (1);

Thanks,
Cheez

Originally posted by jimburton
you can use an init function that sets up all your variables in the first place then you just need to call that again...

pom
12-22-2002, 02:20 AM
Well, you could reload the same .swf in _level0. Dirty, but it refreshes all right.

pom :cool:

cheez
12-23-2002, 05:09 AM
The file should be about 50K so might work out.

Thanks,
Cheez

Originally posted by pom
Well, you could reload the same .swf in _level0. Dirty, but it refreshes all right.

pom :cool: