Is there AS 3.0 script similar to getURL to automatically forward after flash

Discussion in 'Programming' started by GReddy4u, Dec 10, 2009.

  1. #1
    I'm trying to get my flash intro to automatically forward to the main site once it is finished loading. I know that in earlier actionscript versions the following code would work, but I'm using CS4 and I can't find any work around.
    getURL("mydomain/mypage");

    Any help would be appreciated!
     
    GReddy4u, Dec 10, 2009 IP
  2. jasevv

    jasevv Guest

    Messages:
    25
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    The getURL method is used in ActionScript 2.0 and is no longer available to ActionScript 3.0
    In ActionScript 3.0 you can navigate to a site, say google.com
    as shown below:
    
    var url:String = "http://www.google.com";
    var request:URLRequest = new URLRequest(url);
    
    try {            
        navigateToURL(request);
    } catch (e:Error) {
        trace(e);
    }
    
    Code (markup):
    Hope that helps.
     
    Last edited: Dec 11, 2009
    jasevv, Dec 11, 2009 IP