PDA

View Full Version : using prevFrame for unloading movie?



s4ul3
November 25th, 2005, 08:58 AM
Hey!

I read a tutorial about complex buttons with prevFrame function on this site. I was wondering how I could use this function to unload my movie. I have a movie (swf) that loads itself into another movie. Now what I would like form this movie to do is to kindly unload itself the way it loaded in. This should happen once a button on the main (root) timeline would be pressed. I already have all the buttons set up, but I have no idea how to write a code that would send my movie backwards.

I is simply put a this.onEnterFrame = prevFrame; on the last frame, but now there is a problem. I have to somehow stop this movie until a button is pressed. And only when a button is pressed it should execute prevFrame.

huh..

Thx for your time!
Dane

varecha
November 25th, 2005, 09:35 AM
why dont u use removeclip instead or going back in frames? u can use swapdephts to give it a high depth value then just remove it with removemovieclip

somethign like this
yourbutton.onPress = function() {
yourmovie.swapDepths(value);
yourmovie.removeMovieClip();
}

i hope it works, also have a look at this tutorial:

http://www.kirupa.com/developer/actionscript/depths.htm

cheers