all groups > flash actionscript > may 2005 >
You're in the

flash actionscript

group:

Clearing a Movie Clip???


Clearing a Movie Clip??? mlallier
5/28/2005 12:00:00 AM
flash actionscript:
Help!
I have a standalone EXE that has (6) different Movie Clips that can be called
up from a main menu selection on the stage.
Each MC has many buttons and they overlay each other.

My problem is that the buttons from the previous MC are still selectable,
although - unseen.
How can I clear out the previous MC when one of the main menu buttons are
selected?

Thanks!
Re: Clearing a Movie Clip??? kglad
5/28/2005 12:00:00 AM
Re: Clearing a Movie Clip??? BLCarav
5/28/2005 12:00:00 AM
mlallier wrote:How can I clear out the previous MC when one of the main menu
buttons are selected?

If you are calling each mc into an mc in the maintimeline just add this string
within the button functions that call it.

unloadMovieClip("myMovie");

example:
myButton.onRelease = function(){
unloadMovieClip("myMovie");
//here you would put in the existing code that will call the new movieclip
into the same spot
loadMovieClip("myOtherMovie");
}

If you are using levels to call in the movie clip use the unloadMovieNum
command in the button function.

example:
myButton.onRelease = function(){
unloadMovieNum(20);
// then call in the new movie to the same level with loadMovieNum command
loadMovieNum("myOtherMovie",20);
}

I hope this was helpful. There are probably better ways to do it, but this is
what I've used in the past.
Re: Clearing a Movie Clip??? BLCarav
5/29/2005 11:34:26 PM
Sry, my first example is wrong and just doesn't apply since it would be for to
call in and clear out an external .swf file which i didn't do correctly anyway
and I don't think you wanted to use unloadMovieNum so again, disregard my post.
Sorry for any confusion.
Re: Clearing a Movie Clip??? rlc5611
5/30/2005 12:00:00 AM
One thing you could consider is to use createEmptyMovieClip and use the same
name and same depth as the previous clip. I use this quite a bit to start from
scratch. It is a bit heavy handed but effective.
Re: Clearing a Movie Clip??? mlallier
5/31/2005 9:36:56 PM
Thank-you for the responses. I still have a question. I never use a movie clip
method, but created movie clips by the insert symbol. In the main timeline the
first movie clip contains some buttons (which are transparent but clickable on
subsequent "movie clips").

Could someone give me a little more detailed information on how to solve these
carry over invisible buttons?

Thank you
AddThis Social Bookmark Button