ive realised that nowi need to attach the movie to the stage. I tried the enterframe becuse the clip was not removing.
ActionScript Code:
var movieclip = attachMovie("clip","clip_one",this.getNextHighestDepth);
btn.onPress = function(){
movieclip.removeMovieClip();
}
//problem solved_____________________________________________
just a query
now the reason for me removing the movieclip . my method at the present time.
add point in a game is to make the coin invisible. use alpha function. and move the collected coins to side of the stage
if i totally remove the coins, the score is not kept.
now this not a problem as the player can not see the collected coins .
I dont think this method is best way.
Ive heard an
Object() keeps the movieclips properties when even when removed
from the stage.
my example below is what i have been using. ive not included my whole code. im sure its not neccessary. To move the invisible movieclips to side of stage. if remove the moveiclip totally the score lost.The movieclips properties are no longer available. This why i used this method below.
ActionScript Code:
for(i =0; i< coin_array.length; i++){
if(player.hitTest(coins[i])){
coiin_score +=1; // add score
coins[i]._alpha = 0;// make coin invisible
coins[i]._x = 0;// move coin to side of stage. off game area
}
}