0 Replies Latest reply on Apr 8, 2007 1:37 PM by small_guy

    code placement for drop down menu within an animated button

    small_guy
      I have a main menu comprised of 7 buttons; 6 of which are all straight forward with an animation. (The animation is that when the buttons are rolled over the button extends itself out to the right. On the rollout the button returns to its original state.) The 6 all function fine.

      The 7th menu button is the same idea but with the edition of a two button drop down menu that appears when the main button is rolled over. The roll over part is fine. My problem is moving the cursor off the main button to get to the sub-menu items without having them disappear once the cursor if off the main 7th button.

      Within the time line of the 7th button (all of the buttons are movie clip buttons) I put an invisible button, removing the sections over both the main button and the sub buttons. I have tried the following:

      (I should point out that the labels within the button for the animation are an _up, _over and _out states...the buttons animate out in the _over label and animate back to the original position in the _out label,)

      The code and where I have (unsuccessfully) tried placing it are as follows:

      1.) On the invisible button itself (within the main button):
      on (rollOver) {
      gotoAndPlay("_out");
      }

      2.) On the Actions layer (within the main button):
      invisible_btn.onRollOver = function () {
      gotoAndPlay("_out");
      }

      3.) On the Actions layer (on the main timeline...which is where the code for the other 6 buttons is and running as should):
      btnMusic_mc.invisible_btn.onRollOver = function () {
      btnMusic_mc.gotoAndPlay("_out");
      }

      4.) Just a slight variation of #3 (still on the Actions layer of the main timeline):
      btnMusic_mc.invisible_btn.onRollOver = function () {
      brnMusic_mc.invisible_btn.gotoAndPlay("_out");
      }

      The result for all four of these options has been the same. In rolling over the main button (btnMusic_mc) it does animate out as it should, exposing the two sub buttons. But moving the cursor off the btnMusic_mc neither allows me to reach the sub buttons nor does the btnMusic_mc animate back to its first position (as it should). It just snaps back into that position.

      Clearly I am missing something here. Any thoughts would be appreciated.