Hi everyone, this is my first time working with depths, so bare with me.
I’ve realized that I am unable to swap depths between _root. and nested mc’s based on its _y axis.
For example, I use this code:
_root.player.onEnterFrame =function() {
this.swapDepths(this._y-230)
_root.objectHolder.object1.swapDepths(_root.objectHolder.object1._y) //nested movieclip
_root.object2.swapDepths(_root.object2._y-230); // _root. movieclip
if(Key.isDown(Key.RIGHT)) {
this._x += 3
}
if(Key.isDown(Key.LEFT)) {
this._x -= 3
}
if(Key.isDown(Key.UP)) {
this._y -= 3
}
if(Key.isDown(Key.DOWN)) {
this._y +=3
}
}
The one in _root. swaps, but the nested one doesn’t. I’ve already tweaked the depths so that the nested depths and the _root. depths match, since the nested mc is lower then the _root.
But it still doesn’t work…any help is greatly appreciated.
PS: Please view [this SWF file for a better understanding. FLA is available [URL=“http://spamtheweb.com/ul/upload/230410/79884_depthIssue.fla”]here](http:// http://spamtheweb.com/ul/upload/230410/79498_depthIssue.php) too (I’m on a Mac, so no viruses)
-Jephz