Posted by Tyler Madison | Posted in Actionscript Tips | Posted on 13-07-2009
There are lots of reasons for the upgrade to the URLRequest object from AS2’s getURL method. The major reason is that the URLRequest contains all of the HTTP information for a specific url request, content headers , get or post methodsĀ , content type etc. BUT the downside is that it takes a little more effort and importing to get the same functionality as the AS2 standard getURL method. So I’ve include a simple global getURL class that you just need to import wherever it is used, then you can just call “getURL” as it worked in AS2, but now for AS3. The function takes two parameters; The first is the URL that you want to direct to, the second and optional parameter is the window method(“_blank” , “_self” , “_parent” ) which defaults to “_blank”.
The simplest implementation would be:
import getURL;
getURL("http://www.google.com");
ENJOY!
* This is really only useful when you just need to launch a single url without special data being sent, as there is no access to the URLRequest object specifically.

Great site, I will be back. Well done