Be a Supporter!

Linking Url's With Actionscript 2.0

  • 189 Views
  • 8 Replies
New Topic Respond to this Topic
MOC-Productions
MOC-Productions
  • Member since: Mar. 27, 2003
  • Offline.
Forum Stats
Member
Level 15
Filmmaker
Linking Url's With Actionscript 2.0 2011-09-08 12:28:14 Reply

I am making a special features menu and I'd like to create buttons that take you to my voice-actor's NG userpage. I remember trying this once before and it worked when I tried it in flash player, but when I uploaded the movie to Newgrounds, the buttons didn't function.

What is the proper code for a button that opens a new tab for a URL?

MOC-Productions
MOC-Productions
  • Member since: Mar. 27, 2003
  • Offline.
Forum Stats
Member
Level 15
Filmmaker
Response to Linking Url's With Actionscript 2.0 2011-09-08 12:38:37 Reply

This is the code I'm using. Will this function on Newgrounds flash player?

on (release) {
getURL("http://moc-productions.newground s.com/", target="_blank");
}

Spysociety
Spysociety
  • Member since: Dec. 30, 2009
  • Offline.
Forum Stats
Member
Level 21
Blank Slate
Response to Linking Url's With Actionscript 2.0 2011-09-08 12:44:16 Reply

getURL("http://www.your-url.com","_blank");
Wolfos
Wolfos
  • Member since: Jan. 19, 2008
  • Offline.
Forum Stats
Member
Level 25
Game Developer
Response to Linking Url's With Actionscript 2.0 2011-09-08 13:16:26 Reply

Don't know a function? Go here:
http://docs.brajeshwar.com/as2/

Look at a class that might contain your function and put 1 and 2 together.
Also, learn AS3.

Wolfos
Wolfos
  • Member since: Jan. 19, 2008
  • Offline.
Forum Stats
Member
Level 25
Game Developer
Response to Linking Url's With Actionscript 2.0 2011-09-08 13:18:12 Reply

By the way, getURL is a global function.

MOC-Productions
MOC-Productions
  • Member since: Mar. 27, 2003
  • Offline.
Forum Stats
Member
Level 15
Filmmaker
Response to Linking Url's With Actionscript 2.0 2011-09-08 13:37:17 Reply

Thanks guys. Hopefully they function when I put the movie up.

MOC-Productions
MOC-Productions
  • Member since: Mar. 27, 2003
  • Offline.
Forum Stats
Member
Level 15
Filmmaker
Response to Linking Url's With Actionscript 2.0 2011-09-08 13:42:24 Reply

Oh, and these will open new tabs/windows right? They won't close the movie, will they?

Spysociety
Spysociety
  • Member since: Dec. 30, 2009
  • Offline.
Forum Stats
Member
Level 21
Blank Slate
Response to Linking Url's With Actionscript 2.0 2011-09-08 14:23:39 Reply

At 9/8/11 01:42 PM, MOC-Productions wrote: Oh, and these will open new tabs/windows right? They won't close the movie, will they?

New tabs: Yes
Close movie: No

MOC-Productions
MOC-Productions
  • Member since: Mar. 27, 2003
  • Offline.
Forum Stats
Member
Level 15
Filmmaker
Response to Linking Url's With Actionscript 2.0 2011-09-08 14:29:29 Reply

Thank you again.