venerdì, febbraio 29, 2008

getURL is now navigateToURL in Actionscript 3

Thanks to this post for a concise example of the replacement for getURL in AS3.

var url:String = "http://site";
var request:URLRequest = new URLRequest(url);
try {
navigateToURL(request, '_blank'); // second argument is target
} catch (e:Error) {
trace("Error occurred!");
}