5 Replies Latest reply on Mar 30, 2007 12:28 PM by kglad

    Nested MovieClip event handlers

    Peter Pawinski
      After figuring out that removeMovieClip won't work on objects with negative depth numbers, I've run into another stumbling block in some menu generation code I'm working on.

      For the most part, my menu code is complete, and functional. However I've been trying to clean up some of the display methods to make it a nicer and smoother interface.

      When you rollover a menu item, a submenu appears. This submenu consists of a number of items. Let's pretend we have this MAIN MENU > SUBMENU > ITEM 1, ITEM2, ITEM 3.

      ITEM 1, ITEM2, and ITEM 3 are nested in SUBMENU. For example, the full path for ITEM 1 is _level0.mainmenu.submenu.item1.

      SUBMENU itself consists of a background object and the item objects. The items all have event handlers assigned to them. onRollOver highlights a selection, onRollOut unhighlights the selection, onRelease jumps to the appropriate Movie Clip.

      What I would like to do is assign an onRollOut event to SUBMENU that collapses the menu on a mouse roll out event. It works, however, when I do this, the event handlers of the nested ITEMs become nonfunctional.

      Is it not possible for parent and child movie clips to both have onRollOut events assigned to them? Or is there something else I'm missing?