I am working on a shooter game. The AS below allows me to duplicate bullet holes when you shoot at objects:
bulletHit_mc.onPress=function(){
i++;
_root.bullet.duplicateMovieClip("bulletNew"+i, i);
}
It works great but I have invisible movie clips that I want to appear (_visible=true;) over the duplicated MC bullet holes. So far they only show up behind the duplicated ones. Even with
myButton.onPress=function(){
myMC._visible=true;
myMC.gotoAndPlay(2);
myMC.swapDepths ( this._parent.getNextHighestDepth( ) );
}
//myMC is the movieclip to show on top of created duplicated movieclips
Can someone tell me what’s going on and hopefully an easy fix?
Thanks!
One way to overcome this could be to have a b;ank movieclip on a layer below the myMC object layer(s) and use the duplicateMovieClip function (not the method like you use now) to place the bullets inside that blank movieclip. In that way they will be anchored in something that is already below your other mc's.
North America
Europe, Middle East and Africa
Asia Pacific