Skip to main content
Participant
January 18, 2012
Question

link doesn't work and makes animation loop

  • January 18, 2012
  • 1 reply
  • 1083 views

i put this in actionscript

on(release)

{

getURL("htt://glennbeyer.freeiz.com/unreal.html");

}

It doesn't work and it makes the animation loop instead of stopping. Anyone know how to fix this?

Is there a way to upload the files to this forum so someone can look at it?

This topic has been closed for replies.

1 reply

Ned Murphy
Legend
January 18, 2012

That is AS2 code and this is the AS3 forum.  So if you are working in AS2 you should start by moving your question to the AS2 forum. 

Aside from that, the url you show in that code is not written correctly... should be http at the beginning.  Also, that code will not stop anything.  You should place a stop(); command if you intend to stop.

glenn_80Author
Participant
January 19, 2012

I put this code in but no luck.

import flash.events.MouseEvent;

topLeftBtn.addEventListener(MouseEvent.CLICK, UnrealHyperlink);

function UnrealHyperlink(event:MouseEvent):void
{
var request:URLRequest = new URLRequest("http://glennbeyer.freeiz.com/unreal.html");
navigateToURL(request, '_self');
}

Ned Murphy
Legend
January 19, 2012

The code appears to be correct.  Did you create a button and give it an instance name topLeftBtn?  Are you intending that a button be used to make the link work?  Do you get any error messages?  Are your Flash Publish settings adjusted for using AS3?