Name
getURL( ) Global Function — load a document into a browser, execute server-sidescripts, or trigger Macromedia Director events
Availability
Flash
2 and Flash 3; enhanced in Flash 4 to
include method
parameter; Flash 5
Synopsis
getURL (URL) getURL (URL, window) getURL (URL, window, method)
Arguments
- URL
A string specifying the absolute or relative location of the document to load or external script to run.
- window
An optional string specifying the name of the browser window or frame into which to load the document. May be a custom name or one of the four presets:
"_blank"
,"_parent"
,"_self"
, or"_top"
.
- method
An optional string specifying the method by which to send the current timeline’s variables to an external script—either
"GET"
or"POST"
. This parameter must be a literal string, not a variable or other expression. The standalone version of the Flash Player always uses the"GET"
method, regardless of themethod
specified.
Description
The getURL( )
function is used to:
Load a document (usually a web page) into a web browser frame or window
Execute a server-side script and receive the results in a browser frame or window
Execute JavaScript code in a web browser
Trigger events from Flash assets imported as sprites into Director
To load a document into the current window or frame, simply specify
the URL of the document without supplying a
window
or
method
argument. Naturally, Flash supports absolute URLs (those that contain a protocol such as “http:” plus a server name or hardware device) ...
Get ActionScript: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.