Jump to content
xisto Community
srawr42

Flash Image Map Linking Questions Flash, CS3, ActionScript, Linking, Image Map

Recommended Posts

Hello, I am making an image map with some odd shaped buttons that should link to external web pages.
The link is recognized but it does not do anything.
I have tried various sets of code from various online tutorials to no avail. Here are some of the things I've tried:

smile.addEventListener(MouseEvent.CLICK, callLink);


function callLink (event: MouseEvent) { var url:String = ("https://www.google.de/?gfe_rd=cr&ei=BwkjVKfAD8uH8QfckIGgCQ&gws_rd=ssl;); var request:URLRequest = new getURL (url);
try { navigateToURL (request, '_self');
} catch (e:Error) {
trace ("Error occurred!");
}
}


and

smile.addEventListener("click",);
//Goto Webpage Behavior
getURL("https://www.google.de/?gfe_rd=cr&ei=BwkjVKfAD8uH8QfckIGgCQ&gws_rd=ssl;, "_self");
//End Behavior


and

smile.addEventListener (MouseEvent.CLICK, onClick);
function onClick (MouseEvent) :void
{
navigateToURL (link);
}



I have switched between AS2 and AS3, but I can't seem to figure out how to do this in either of them. I'm not entirely sure what I'm doing wrong and any help or nudges in the right direction would be greatly appreciated.
Thank you!

Share this post


Link to post
Share on other sites

Don't remember from the top of my head, but if you are still in need of this I will try to help. Let me know.

Any help would be great.

The current set of code I am using is below

function callLink (event: MouseEvent) :void { var url:String = ("https://www.google.de/?gfe_rd=cr&ei=BwkjVKfAD8uH8QfckIGgCQ&gws_rd=ssl;); var request:URLRequest = new URLRequest (url);try { navigateToURL (request, "_blank");} catch (e:Error) {trace ("Error occurred!");}}

It is showing a 1120 error, but from what I understand, that's pretty vague.

Thank you!

Share this post


Link to post
Share on other sites

Any help would be great.

 

The current set of code I am using is below

 

function callLink (event: MouseEvent) :void { var url:String = ("https://www.google.de/?gfe_rd=cr&ei=BwkjVKfAD8uH8QfckIGgCQ&gws_rd=ssl;); var request:URLRequest = new URLRequest (url);try { navigateToURL (request, "_blank");} catch (e:Error) {trace ("Error occurred!");}}

It is showing a 1120 error, but from what I understand, that's pretty vague.

 

Thank you!

 

 

I figured it out. Thanks.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.