Skip navigation
residentevil750
Currently Being Moderated

Movieclip on top of duplicated movieclip

Sep 17, 2012 7:48 PM

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!

 
Replies
  • Currently Being Moderated
    Sep 18, 2012 4:26 AM   in reply to residentevil750

    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.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points