03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Returns<br />

Number - An integer that specifies the Flash Player version that was targeted when the SWF<br />

file loaded into the movie clip was published.<br />

Example<br />

The following example creates a new container <strong>and</strong> outputs the value of getSWFVersion(). It<br />

then uses MovieClipLoader to load an external SWF file that was published to Flash Player 7<br />

<strong>and</strong> outputs the value of getSWFVersion() after the onLoadInit h<strong>and</strong>ler is triggered.<br />

var container:MovieClip = this.createEmptyMovieClip("container",<br />

this.getUpperEmptyDepth());<br />

var listener:Object = new Object();<br />

listener.onLoadInit = function(target:MovieClip):Void {<br />

trace("target: " + target.getSWFVersion()); // target: 7<br />

}<br />

var mcLoader:MovieClipLoader = new MovieClipLoader();<br />

mcLoader.addListener(listener);<br />

trace("container: " + container.getSWFVersion()); // container: 8<br />

mcLoader.loadClip("FlashPlayer7.swf", container);<br />

getURL (MovieClip.getURL method)<br />

public getURL(url:String, [window:String], [method:String]) : Void<br />

Loads a document from the specified URL into the specified window. The getURL() method<br />

can also be used to pass variables to another application defined at the URL by using a GET or<br />

POST method.<br />

Web pages that host Flash movies must explicitly set the allowScriptAccess attribute to<br />

allow or deny scripting for the Flash Player from the HTML code (in the PARAM tag for<br />

Internet Explorer or the EMBED tag for Netscape Navigator):<br />

■ When allowScriptAccess is "never", outbound scripting always fails.<br />

■ When allowScriptAccess is "always", outbound scripting always succeeds.<br />

■ When allowScriptAccess is "sameDomain" (supported by SWF files starting with<br />

version 8 ), outbound scripting is allowed if the SWF file is from the same domain as the<br />

hosting web page.<br />

■ If allowScriptAccess is not specified by an HTML page, it defaults to "sameDomain"<br />

for version 8 SWF files, <strong>and</strong> it defaults to "always" for earlier version SWF files.<br />

You can extend the methods <strong>and</strong> event h<strong>and</strong>lers of the MovieClip class by creating a subclass.<br />

Parameters<br />

url:String - The URL from which to obtain the document.<br />

MovieClip 431

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!