Be a Supporter!

Buttons not working on Newgrounds

  • 746 Views
  • 7 Replies
New Topic Respond to this Topic
SplendidDevil
SplendidDevil
  • Member since: Jan. 1, 2010
  • Offline.
Forum Stats
Member
Level 07
Animator
Buttons not working on Newgrounds 2012-02-01 04:48:50 Reply

Hi, my buttons work locally but when uploaded to Newgrounds or Deviantart they just won't work. Anybody have any idea as to why this is? I'm pretty sure it has something to do with the Newgrounds preloader as that's the only time the buttons don't work.

The current code I have is:

on(release){
getURL("http://youtu.be/sZrO_kqMJDY");
}

Simple nooby code.

Sandremss128
Sandremss128
  • Member since: Aug. 22, 2009
  • Offline.
Forum Stats
Supporter
Level 11
Programmer
Response to Buttons not working on Newgrounds 2012-02-01 05:15:17 Reply

I found out it didnt work the way you have your previous code..:
Heres a link to a swf that shows you that its possible in NG

I dont really know much more about AS2... but I think the reason why it didnt worked was because you had the event fire on release.

Anyways this is the code I used:

onClipEvent(mouseDown){
getURL("http://youtu.be/sZrO_kqMJDY");
}

If you would have used actionscript 3 it would have been way easier lol.

SplendidDevil
SplendidDevil
  • Member since: Jan. 1, 2010
  • Offline.
Forum Stats
Member
Level 07
Animator
Response to Buttons not working on Newgrounds 2012-02-01 05:25:11 Reply

Thanks man, I owe you one!

SplendidDevil
SplendidDevil
  • Member since: Jan. 1, 2010
  • Offline.
Forum Stats
Member
Level 07
Animator
Response to Buttons not working on Newgrounds 2012-02-01 05:30:32 Reply

At 2/1/12 05:25 AM, SplendidDevil wrote: Thanks man, I owe you one!

Wait, it still doesn't work online :/ it's something to do with the preloader.

Nae
Nae
  • Member since: Jan. 14, 2009
  • Offline.
Forum Stats
Member
Level 01
Artist
Response to Buttons not working on Newgrounds 2012-02-01 13:18:02 Reply

At 2/1/12 04:48 AM, SplendidDevil wrote: The current code I have is:
on(release){
getURL("http://youtu.be/sZrO_kqMJDY");
}

...pretty sure you need to add "_blank"

getURL("http://youtu.be/sZrO_kqMJDY", "_blank");

"Why do you hide, stupid aliens? Mr. Zurkon only wishes for to kill you."

BBS Signature
mike
mike
  • Member since: Feb. 24, 2000
  • Offline.
Forum Stats
Member
Level 20
Programmer
Response to Buttons not working on Newgrounds 2012-02-01 13:31:21 Reply

Nae is right, the Flash Player has a weirdo security restriction where you can't open a link in the same window if allowScriptAccess is turned off on the HTML embed (which it is on NG). If you add "_blank", it will open in a new tab.

At 2/1/12 01:18 PM, Nae wrote:
At 2/1/12 04:48 AM, SplendidDevil wrote: The current code I have is:
on(release){
getURL("http://youtu.be/sZrO_kqMJDY");
}
...pretty sure you need to add "_blank"
getURL("http://youtu.be/sZrO_kqMJDY", "_blank");
PyroflameGames
PyroflameGames
  • Member since: Aug. 4, 2007
  • Offline.
Forum Stats
Member
Level 10
Programmer
Response to Buttons not working on Newgrounds 2012-02-01 17:17:45 Reply

At 2/1/12 01:31 PM, mike wrote: ...pretty sure you need to add "_blank"
getURL("http://youtu.be/sZrO_kqMJDY", "_blank");

This.


BBS Signature
SplendidDevil
SplendidDevil
  • Member since: Jan. 1, 2010
  • Offline.
Forum Stats
Member
Level 07
Animator
Response to Buttons not working on Newgrounds 2012-02-18 19:35:12 Reply

You guys are the bestest mannn.