EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Getswfversion (Movieclip.getswfversion Method)

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
1378 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
870 ActionScript classes
See also
getBounds (MovieClip.getBounds method), globalToLocal
(MovieClip.globalToLocal method)
, localToGlobal (MovieClip.localToGlobal
method)
getSWFVersion (MovieClip.getSWFVersion
method)
public getSWFVersion() : Number
Returns an integer that indicates the Flash Player version for the movie clip was published. If
the movie clip is a JPEG, GIF, or PNG file, or if an error occurs and Flash Player can't
determine the SWF version of the movie clip, -1 is returned.
You can extend the methods and event handlers of the MovieClip class by creating a subclass.
Availability: ActionScript 1.0; Flash Player 7
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);

Table of Contents

Related product manuals