Skip navigation
rossco2009
Currently Being Moderated

Drop down menu trobleshooting

Sep 7, 2012 2:59 AM

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);

 
Replies
  • Currently Being Moderated
    Sep 7, 2012 4:15 AM   in reply to rossco2009

    Your first function is missing its ending brace

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 7, 2012 7:01 AM   in reply to rossco2009

    I don't really understand your new problem, but if you need to have something be further down the screen, move it there.  If that code is resposible for the placement, then adjust the values in it.  If the conditional code that surrounds it dictates when different actions are taken, then adjusting the conditions might help as well.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 7, 2012 7:41 AM   in reply to rossco2009

    You're welcome

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points