03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

yMax --> 110<br />

yMin --> 10<br />

xMax --> 110<br />

xMin --> 10<br />

See also<br />

getBounds (MovieClip.getBounds method), globalToLocal<br />

(MovieClip.globalToLocal method), localToGlobal (MovieClip.localToGlobal<br />

method)<br />

getSWFVersion (MovieClip.getSWFVersion<br />

method)<br />

public getSWFVersion() : Number<br />

Returns an integer that indicates the Flash Player version for the movie clip was published. If<br />

the movie clip is a JPEG, GIF, or PNG file, or if an error occurs <strong>and</strong> Flash Player can't<br />

determine the SWF version of the movie clip, -1 is returned.<br />

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

Availability: <strong>ActionScript</strong> 1.0; Flash Player 7<br />

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 />

882 <strong>ActionScript</strong> classes

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

Saved successfully!

Ooh no, something went wrong!