Skip navigation
pc234
Currently Being Moderated

Flash CS4 as3 buttons don't respond

Jul 20, 2012 12:33 PM

I have a flash problem I can only click on one button and that's it. I have 5 buttons that go to different pages but if i click on, lets say the about button, it will go but that's it. I can't click on any other buttton. The code is below. I don't see what i'm doing wrong. Help is needed. Thanks!

stop();

 

home.addEventListener(MouseEvent.CLICK, gohome);
function gohome(MouseEvent):void{
gotoAndStop(1);
}
about.addEventListener(MouseEvent.CLICK, goabout);
function goabout(MouseEvent):void{
gotoAndStop(2);
}
history.addEventListener(MouseEvent.CLICK, gohistory);

function gohistory(MouseEvent):void{
gotoAndStop(3);
}
cast.addEventListener(MouseEvent.CLICK, gocast);
function gocast(MouseEvent):void{
gotoAndStop(4);
}
bios.addEventListener(MouseEvent.CLICK, gobios);
function gobios(MouseEvent):void{
gotoAndStop(5);
}
tickets.addEventListener(MouseEvent.CLICK, gotickets);
function gotickets(MouseEvent):void{
gotoAndStop(6);
}


 
Replies
  • Currently Being Moderated
    Jul 20, 2012 12:55 PM   in reply to pc234

    It sounds like you have multiple instances of each button.  Explain how you have the buttons implemented in the timeline, if possible include a screenshot of the timeline. 

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 20, 2012 2:21 PM   in reply to pc234

    You should become familiar what the Print Screen button on your keyboard. 

     

    The explanation and the picture you provided do not indicate what's what.  If that layer labeled "menu" is where the buttons are, that it only occupies the first frame could be a good reason your buttons won't work in other frames - they aren't there.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 20, 2012 4:32 PM   in reply to pc234

    First you should explain your design as I already requested.  Otherwise I am only guessing what you did. 

     

    If your buttons do not extend the full length of the timeline, then you can expect them to not be useable when you move to other frames since they are no longer present.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 20, 2012 7:44 PM   in reply to pc234

    Where are the buttons on the timeline - which layer, which frames?  What do you mean when you say it freezes?

     

    There is nothing wrong with the code, so there is probably something wrong with how you have implemented the buttons relative to the code.

     
    |
    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