View Full Version : Closing Movie Symbols
davydany
07-17-2006, 02:49 AM
I have a movie symbol which asks a user for a question. the user has to hit OK or CANCEL. when they hit CANCEL, the window should close. i tried:
on (press) {
this.close();
}
but from what i've read, close is for network connections and etc.
so i tried:
on (press) {
_root.instanceName._alpha=0;
}
but this just makes the stuff disappear and not close it completely. how do i do it?
Frosty_spl
07-17-2006, 02:54 AM
can you make it its own swf, and when you want it to load, just load in that swf in a level N. When you want it to close, just unload the level N.
davydany
07-17-2006, 04:21 AM
i tried what u said. but the buttons on the swf cannot be clicked when loaded into my 'scene 1'.
i tried to unload the movie
this.unload();
but i guess im doin smthin wrong there. any other suggestions?
Frosty_spl
07-17-2006, 05:23 AM
you have to make what you want to come up, a new scene, and publish that scene. lets say you call the scene home. when you click on the button to load it, put this on the button
on (release) {
loadMovieNum("yourmovie_home.swf", 10);
}
that loads the home.swf into level 10. to remove the swf, something like this should be on your cancel button:
on (release) {
unloadMovieNum(10);
}
sophistikat
07-17-2006, 03:31 PM
if you are creating your movieclip using createMovieClip(), attachMovie(), duplicateMovieClip(), you can simply 'close' a movieclip with instanceName.removeMovieClip();
if you didn't use any of those three method (you place the movieclip on the stage manually) you first need to move that clip into its own depth using instanceName.swapDepths(100); and then use instanceName.removeMovieClip();
what version of flash are you working on?
davydany
07-17-2006, 03:45 PM
what version of flash are you working on?
MX 2004
sophistikat
07-17-2006, 03:55 PM
MX 2004then you can simply use any method i showed you; Frosty's method can work as well but i don't like to work with levels. you can always post your .fla so that we can take a closer look.
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.