To open a Web page in a browser window, or to pass data to another application at a defined URL, you can use the getURL
action. For example, you can have a button that links to a new Web site, or you can send data to a CGI script for processing in the same way as you would an HTML form.
In the following procedure, the requested file must be at the specified location and absolute URLs must have a network connection (for example, http://www.myserver.com/).
For information on passing variables, see "Connecting with External Sources" in Using Flash.
To jump to a URL:
getURL
action.A relative path lets you describe one file's location in relation to another; it tells Flash to move up and down the hierarchy of nested files and folders, starting from the file where you issued the getURL
instruction. An absolute path is the complete address that specifies the name of the server on which the file resides, the path (the nested hierarchy of directories, volumes, folders, and so on), and the name of the file itself.For more information about writing paths, see "About absolute and relative target paths" in Using Flash.
For example, the following statement indicates that the URL is the value of the variable dynamicURL
:
getURL(dynamicURL);
For information on writing expressions, see Using operators to manipulate values in expressions.
_self
specifies the current frame in the current window.
_blank
specifies a new window.
_parent
specifies the parent of the current frame.
_top
specifies the top-level frame in the current window.
Your code would look similar to the following line:
getUrl ("page2.html", "blank");
The getURL
action loads the HTML file page2.html into a new browser window.
For more information on the getURL
action, see its entry in the online ActionScript Dictionary in the Help menu.