Skip navigation
Codizzle3280
Currently Being Moderated

Button Link Problems .swf

Nov 2, 2012 10:25 AM

Tags: #swf #link #button #geturl

Hello. I am using Adobe Flash CS6. I am having trouble making 2 separate links for 2 buttons. I have been unsuccessful. I made 2 different buttons and thought i made 2 separate links. But, When both buttons are clicked, they link to the same page. I want them to go to separate pages.... Any suggestions? Here is a link to the file... Maybe someone could pin point the problem?

 
Replies
  • Currently Being Moderated
    Nov 2, 2012 10:46 AM   in reply to Codizzle3280

    What code are you using for the two buttons?  Have you assigned different names to the buttons and the functions they call?

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 2, 2012 2:54 PM   in reply to Codizzle3280

    Show the code for your two buttons.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 2, 2012 4:39 PM   in reply to Codizzle3280

    There is nothing terrible about the code, it is just missing a couple things. 

     

    The problem with what you have now is that you are essentially adding two event listeners to the stage/main timeline, so when you click anything you trigger both functions, but only one of them can ultimately win (probably the last executed).

     

    Select the button for the first set of code that you show and in the Properties panel, assign it an instance name where it says "<Instance Name>"... let's say you name it "page4Btn"   Then change your first line of code to be...

     

    page4Btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage_4);

     

     

    Then repeat the process for the other button, using a different instance name for the button.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 3, 2012 9:33 AM   in reply to Codizzle3280

    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