Hi karlectomy!
That is no wroking because that's not the correct sintax to the removeMovieClip method.
The correct sintax is the following:
-
someMC.removeMovieClip(targetMC);
-
What this does is removing the targetMC that's inside someMC.
If your movieclip "again" is on the root I reccomend to to declare a global variable (that is, outside any function) calld home for example, and making it equal to this (I mean, the "this" pseudo-object), so the variable home, will always be the local root, even inside functions.
Then you can use this as follows:
-
var home:MovieClip = this;
-
-
function gameOn():Void {
-
home.removeMovieClip(again);
-
}
-
Best regards,
The_Nephilim
Quote:
Originally Posted by karlectomy
My button won't leave the stage.
I'm programming in AS2.0 using Flash MX2004
I attach the button "again" to the stage and its release function is gameOn where I remove the movie clip.
For some reason, It won't leave the stage...
I've tried to look at e
verything but maybe I'm missing something.
any help would be greatly appreciated.
- function gameOn()
-
{
-
again.removeMovieClip();
-
}
-
-
function gameOver()
-
{
-
attachMovie("again", "again", 201);
-
again._xscale = 120;
-
again._yscale = 60;
-
again._x = 280;
-
again._y = 300;
-
again.onRelease = gameOn;
-
}