getURL in Flash 9 and ActionScript 3

Create a symbol
Choose button
Select the button
Assign the action below


findMore.addEventListener(MouseEvent.CLICK, callLink);
function callLink(event:MouseEvent):void {
var url:String = "http://www.your-url.com";
var request:URLRequest = new URLRequest(url);
try {
navigateToURL(request, '_blank');
} catch (e:Error) {
trace("Error occurred!");
}
}

Based from: http://scriptplayground.com/tutorials/as/getURL-in-Actionscript-3/

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.