1 Reply Latest reply on Jul 19, 2006 2:50 PM by kalibahlutwo

    Determine which movieclip is on top?


      I'm creating a Flash file that has movieclips which use behavior similar to many OS windows, in that they have a title bar at the top which can be double-clicked to minimize that particular mc to just the title bar, and double-clicking again will open it back up. Another behavior the mc's have is that when you click on one that's overlapped by another, it comes to the topmost depth level. The problem I'm having is that in order to have double-click behavior in the title bar, I'm using onClipEvent (mousedown), and this makes title bars of the movies which are under other movies come to the top when clicked *through* movies on a higher depth levels, for example if you try to interact with the overlapping movie, and the titlebar of a lower depth movie happens to be under the mouse. Here's the code in the title bars:
      If I take out "onClipEvent" and just use "on (release)", for example, it doesn't check for double-clicking for some reason.

      Does anyone have any suggestions about how I can tell it not to bring the mc's at lower depth levels to the top when they're clicked on through overlapping mc's? Or any other work-arounds are welcome! Thanks in advance for your help!
        • 1. Re: Determine which movieclip is on top?
          kalibahlutwo Level 1
          OK, never mind... now I changed onClickEvent(mousedown) to on (release), and it works fine. But it woud still be handy to know how to determine what's on top, or directly under the mouse, if anyone knows.

          Also, using this script, when an exposed area of an overlapped MC is clicked to bring it to the front, the other MCs reorder their depths a little bit, too, and it looks wrong... Does anyone know a better way to do this so that the clicked MC will come to the front, and the other MCs will keep their depth relationship to each other?

          Thanks so much!