I am trying to embed a URL into my swf file. I have placed an invisible button and given it the following actionscript:
function linkToSite(evt:MouseEvent):void {
var url:String = "http://www.google.com"; // replace with your url
var req:URLRequest = new URLRequest(url);
navigateToURL(req, "_self");
}
urlBtn.addEventListener(MouseEvent.CLICK, linkToSite);
When I open the swf file the link doesn’t work. Can anyone help me? I have attached my files.
Thanks