Posted By

damarev on 04/14/09


Tagged


Versions (?)

Who likes this?

8 people have marked this snippet as a favorite

themill
Bluewall
gudeidea
loric
kmallea
Winkyboy
tspitzr
Josueriv


getURL in AS3


 / Published in: ActionScript 3
 

URL: http://www.senocular.com/flash/actionscript.php?file=ActionScript_3.0/getURL.as

  1. package {
  2.  
  3. import flash.net.URLRequest;
  4. import flash.net.navigateToURL;
  5.  
  6. /**
  7. * getURL for ActionScript 3.0. Similar
  8. * to getURL of ActionScript 2.0 in simplicity
  9. * and ease. Errors are suppressed and traced
  10. * to the output window.
  11. */
  12. public function getURL(url:String, target:String = null){
  13.  
  14. try {
  15. navigateToURL(new URLRequest(url), target);
  16. }catch(error:Error){
  17. trace("[getURL] "+error);
  18. }
  19.  
  20. }
  21. }

Report this snippet  

You need to login to post a comment.