Copy link to clipboard
Copied
I'm new to flash builder I add a button to my page how do I link it to a web site ?
Copy link to clipboard
Copied
your_button_name_here.addEventListener(MouseEvent.CLICK, callLink);
function callLink(event:MouseEvent):void {
var url:String = "the_url_of_the_website_here";
var request:URLRequest = new URLRequest(url);
try {
navigateToURL(request, '_blank');
} catch (e:Error) {
trace("Error occurred!");
}
}
I hope this helps
Loukas