User Guide

MovieClip 473
Returns
Number - An integer that specifies the Flash Player version that was targeted when the SWF
file loaded into the movie clip was published.
Example
The following example creates a new container and outputs the value of
getSWFVersion(). It
then uses MovieClipLoader to load an external SWF file that was published to Flash Player 7
and outputs the value of
getSWFVersion() after the onLoadInit handler is triggered.
var container:MovieClip = this.createEmptyMovieClip("container",
this.getUpperEmptyDepth());
var listener:Object = new Object();
listener.onLoadInit = function(target:MovieClip):Void {
trace("target: " + target.getSWFVersion()); // target: 7
}
var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(listener);
trace("container: " + container.getSWFVersion()); // container: 8
mcLoader.loadClip("FlashPlayer7.swf", container);
getURL (MovieClip.getURL method)
public getURL(url:String, [window:String], [method:String]) : Void
Loads a document from the specified URL into the specified window. The getURL() method
can also be used to pass variables to another application defined at the URL by using a
GET or
POST method.
Web pages that host Flash movies 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, it defaults to "sameDomain"
for version 8 SWF files, and it defaults to
"always" for earlier version SWF files.
You can extend the methods and event handlers of the MovieClip class by creating a subclass.
Availability: ActionScript 1.0; Flash Lite 2.0