Ok, let me first start by saying my problem. My current problem is: When the main character hits the zombie it activates a script to gotoAndStop(“dead”);. The problem here is that when it gets to the dead frame, the main character and zombie movieclips are still on the screen. I am positive this is due to my depth script because I have removed it and noticed it worked fine. + it makes sense if you think about it. Below is my depth script.
onClipEvent(enterFrame){
if(this._y<_root.mainchar._y){
_root.mainchar.swapDepths(_root.getNextHighestDepth());
}else if(this._y>_root.mainchar._y){
this.swapDepths(_root.getNextHighestDepth());
}
}
So I have a few ideas on how I may get around this, but I need some help on two parts.
1.) I can’t remember how to check if its on a certain frame. So something like “if(onframe=1)”. I’v done this before, I just can’t remember how to do it or find the file I did it in.
2.) Is there a way to do lowest depth?
Example: _root.getLowestDepth() <------- doesn’t work, just example. :-/