Skip to main content
Participant
September 26, 2011
Question

One Button to URL works, Second Button will not

  • September 26, 2011
  • 1 reply
  • 270 views

I am relatively new to Flash CS5, using AS2.

I have made two buttons on the same frame linking to two separate urls.  I made them the exact same way, however only one of them works when tested in the swf file.  I put the buttons on two separate layers thinking that could have been a problem, but it still won't work.  There is no error, and when the house hovers over both buttons the finger shows, recognizing that it is a button.  Only the second button will actually open up the webpage.

Here is the code I am using for the first button (the one that won't work):

on (release) {

    getURL("http://www.knightsofbabylon.com/home.html","_new","GET");

}

Second button:

on (release) {

    getURL("http://www.bardsofbohemia.com","_new","GET");

}

I have searched for a solution and tried to add the button instance before but only find the error "Expected a field name after '.' operator" once I put those in.  (And yes, my instance starts with a letter, not a number). 

If anyone could help I'd really appreciate it.. thanks!

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
September 26, 2011

are you using an iframe named _new?  if not use:

on (release) {

    getURL("http://www.knightsofbabylon.com/home.html","_blank");

}

Second button:

on (release) {

    getURL("http://www.bardsofbohemia.com","_blank");

}