5 Replies Latest reply on Jul 25, 2006 10:15 PM by kglad

    problem with swapDepth with press event

    scriptrookie
      Hi guys,

      Im getting confused with swapDepth for navigation buttons. I have a button mc's that use this for stacking but something weird happens on just the press event. I have tried to take away the press event but the problem makes it more difficult. This was the script i tried to tweak on the button in order to swapDepth with the mc next to it:

      on (press, release, releaseOutside) {
      _root.x +=2;
      _root.bar_mc.swapDepths(_root.x);
      _root.red_mc.swapDepths(_root.bar_mc);
      trace("bar: " + _root.bar_mc.getDepth());
      trace("red: " + _root.red_mc.getDepth());
      }

      ..where the bar_mc is just an border mc so that the clicked button will appear on top of it as well as the rest of the button mc, my problem comes when you just perform press event w/o releasing it, all the buttons appear on top of the border mc, it only becomes normal after releasing the mouse. I mean users will notice this so I cant figure out how to tell all unclicked buttons not to appear on top of border mc on press event. Did this happened to anyone? I would gladly appreciate any suggestions that you can give. You can see the FLA version here -> http://www.janethsieh.net/flash/swapDepth.fla

      _scriptRookie