5 Replies Latest reply: Sep 7, 2012 7:41 AM by Ned Murphy RSS

    Drop down menu trobleshooting

    rossco2009

      Hi

       

      I'm stuck with this code for a drop down menu. The error message says It's expecting a right brace before the end of the program but as far as I can tell there's already one there... Any ideas are welcome!

       

      import flash.events.Event;

      import flash.display.SimpleButton;

       

       

      addEventListener (Event.ENTER_FRAME,dropmenu1);

       

       

      pages.stop();

       

       

      var speed:Number=.3;

       

       

      function dropmenu1(e:Event) {

                if ((menu_1.mouseY<menu_1.height&&menu_1.mouseY>0) && (menu_1.mouseX<menu_1.width&&menu_1.mouseX>0)) {

                menu_1.y-=(menu_1.y) *speed;

      } else {

                menu_1.y-=(55+menu_1.y) *speed;

      }

       

       

      function makebtn (btn:SimpleButton,frame:Number) {

                btn.addEventListener (MouseEvent.CLICK,function() {pages.gotoAndStop (frame);});

                }

       

       

      makebtn (menu_1.CAT_strategy_btn,1);

      makebtn (menu_1.stage_1_btn,2);

      makebtn (menu_1.stage_2_btn,3);