My Z-sorting works great, but it would be nice if the button became inactive if the topDepth = 1. If another button is clicked it would become active again. This would prevent the menu_1_mc from playing again if clicked repeatedly.
Heres the code. Any clues? thx. h
// set a variable to start initial depth
topDepth = 1;
// handle onRelease event
b1.onRelease = b1.onReleaseOutside = function() {
_root.menu_1_mc.swapDepths(_root.topDepth);
++_root.topDepth;
_root.menu_1_mc.gotoAndPlay(1);
};
–
I tried something like this but couldnt get it to work…
if (_root.topDepth == 1) {
_root.menu_1_mc = new _root.topDepth();
}