srawr42 0 Report post Posted February 26, 2009 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!");}} andsmile.addEventListener("click",); //Goto Webpage Behavior getURL("https://www.google.de/?gfe_rd=cr&ei=BwkjVKfAD8uH8QfckIGgCQ&gws_rd=ssl;, "_self"); //End Behavior andsmile.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
eddyruiz 0 Report post Posted March 21, 2009 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. Share this post Link to post Share on other sites
srawr42 0 Report post Posted March 23, 2009 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 belowfunction 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
srawr42 0 Report post Posted April 2, 2009 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