At 10/26/03 07:48 PM, ChocolateChipClock wrote:
At 10/26/03 07:47 PM, ChocolateChipClock wrote:
you dont have to use numbers for swaping depths, you can also swap depths with movieclips like this.
heh, woops, the code is slightly wrong. here's the right code.
if (_y>_root.mc._y) {
this.swapDepths(_root.mc);
}
if (_y<_root.mc._y) {
_root.mc.swapDepths(this);
}
but I want to work with lots of MCs. its going to be a game like the game called "Tactical Combat"
So some of the MCs won't have instance names or they might or names that always change eg(if i was to duplicate).
so is theres a way of saying;
this MCs _depth = this MCs _y
this way i can put this comand in all of my movieclips instead of this one
if (_y>_root.mc._y) {
this.swapDepths(_root.mc);
}
if (_y<_root.mc._y) {
_root.mc.swapDepths(this);
}
if (_y>_root.mc2._y) {
this.swapDepths(_root.mc);
}
if (_y<_root.mc2._y) {
_root.mc2.swapDepths(this);
}
if (_y>_root.mc3._y) {
this.swapDepths(_root.mc3);
}
if (_y<_root.mc._y) {
_root.mc3.swapDepths(this);
}
and so on and so on.
but thanks for your help anyway.