What ever happened to getURL within Actionscript 3.0?
If you wanted to create a link to another website in ActionScript 2.0, here’s what it would have looked like:
The command getURL used to a be very easy way to create an outbound link within Flash. This one line of code code easily fitted perfectly within a button onRelease event. Not so easy anymore.
URL Navigation in AS2
getURL("http://www.google.com/", "target", "method");
URL Navigation in AS3
import flash.net.*; var url:String = "http://www.google.com/"; var request:URLRequest = new URLRequest(url); navigateToURL(request, 'target');
Along with many other easy Actionscript 2.0 calls, getUrl has changed. It uses a couple more lines of code and has changed to navigateToURL. You might be asking why would the amount of lines increase for such a simple task. It is what it is, but if this is the price we have to pay for a vast improvements to the language then bring it on. 🙂