User Guide
872 ActionScript classes
getURL (MovieClip.getURL method)
public getURL(url:String, [window:String], [method:String]) : Void
Loads a document from the specified URL into the specified window. You can also use the
getURL() method to pass variables to another application that is defined at the URL by using
a
GET or POST method.
Web pages that host Flash content must explicitly set the
allowScriptAccess attribute to
allow or deny scripting for the Flash Player from the HTML code (in the
PARAM tag for
Internet Explorer or the
EMBED tag for Netscape Navigator):
■ When allowScriptAccess is "never", outbound scripting always fails.
■ When allowScriptAccess is "always", outbound scripting always succeeds.
■ When allowScriptAccess is "sameDomain" (supported by SWF files starting with
version 8 ), outbound scripting is allowed if the SWF file is from the same domain as the
hosting web page.
■ If allowScriptAccess is not specified by an HTML page, the default value is
"sameDomain" for version 8 SWF files, and the default value is "always" for earlier
version SWF files.
When using this method, consider the Flash Player security model. For Flash Player 8, the
method is not allowed if the calling SWF file is in the local-with-file-system sandbox and the
resource is nonlocal.
For more information, see the following:
■ Chapter 17, "Understanding Security," in Learning ActionScript 2.0 in Flash
■ The Flash Player 8 Security white paper at http://www.macromedia.com/go/fp8_security
■ The Flash Player 8 Security-Related API white paper at http://www.macromedia.com/go/
fp8_security_apis
You can extend the methods and event handlers of the MovieClip class by creating a subclass.
Availability: ActionScript 1.0; Flash Player 5
Parameters
url:String - The URL from which to obtain the document.
window:String [optional] - A parameter specifying the name, frame, or expression that
specifies the window or HTML frame that the document is loaded into. You can also use one
of the following reserved target names:
_self specifies the current frame in the current
window,
_blank specifies a new window, _parent specifies the parent of the current frame,
and
_top specifies the top-level frame in the current window.