/ Published in: ActionScript 3

Great little snippet I use to target an external link.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// gotoLink takes 3 parameters: the event, the URL string, and the method (_self, _blank, etc) // // sample usage: // gotoLink( evt, "http://google.com", "_blank" ); function gotoLink( evt:Event, l:String, meth:String ) : void { var URLReq:URLRequest = new URLRequest(l); try { navigateToURL(URLReq, meth); } catch (e:Error) { trace(e); } }
Comments
