3 Replies Latest reply on Oct 29, 2009 7:30 AM by Ned Murphy

    Buttons Stop Working after another is pressed


      Hi, I have 2 main movie clips, one for the menu bar and one for the content, there is then a movie clip within each one of those, one to hold the set of buttons, and one to hold the content movie clips.

      The menu bar has a control to flip between 2 sets of buttons.

      the viva content button works fine to begin with, but after the menu bar control is clicked, the content buttons stops working.

      Code is as Follows:

      All of the code (bar a few stop() flags on cirtain frames) is located on frame 1 of the root, which is the only frame on the root.

      barControl.barContent.barUp.addEventListener(Mouse  Event.CLICK, menuSwitchHandle);
      barControl.barContent.barDown.addEventListener(Mou  seEvent.CLICK, menuSwitchHandle);

      barControl.barContent.barMenu.vivaBtn.addEventList  ener(MouseEvent.CLICK, vivaHandle);

      function menuSwitchHandle(event:MouseEvent):void {
      function vivaHandle(event:MouseEvent):void {

      Thanks for your time,

      Kind Regards,

      Peter Chapman

        • 1. Re: Buttons Stop Working after another is pressed
          Ned Murphy Adobe Community Professional & MVP

          The code you show looks fine.  This sounds like a scope issue, meaning whatever buttons you are trying to use are not assigned any code.  I don't get a good mental picture of how you have things set up, especially when you say you have two sets of buttons.  If all your code is in frame 1, and you have two sets of buttons, I suspect that maybe the second set isn't getting anything assigned, though as I already said, I'm not clear on that aspect.


          If you aren't getting any error messages, then it seems likely that the buttons you expect are coded are not.

          • 2. Re: Buttons Stop Working after another is pressed
            brainstrainer Level 1

            SetUp is as follows:






                           -vivaButton, other buttons



                      -viva Content Movie Clip (and other respective movie clips)



            The Content Clips have 2 frames:

            1:     stop()

            2:     stop()


            The menu bar has a few extra frames due to the tween animation:

            1:     stop()

            5:     stop()

            9:     gotoAndPlay(1) (which actually stops at 1 because of the stop() tag on frame 1)


            Actually, pressed the menu control button once (to swap to the second set of icons) is ok, and the second set of buttons still work, but then as soon as i return to the original set, none of them work, so i guess it is something to do with the way the menu bar is returning to the beginning?


            Kind Regards,


            Peter Chapman

            • 3. Re: Buttons Stop Working after another is pressed
              Ned Murphy Adobe Community Professional & MVP

              Sorry that I'm still not clear on the workings of that menu, but if the buttons lie on different frames, then your best bet is to have the code on the frames where they are.  And if you have them transition in, be sure to put instance names for each one on each keyframe.