EasyManua.ls Logo

MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE - Getswfversion (Movieclip.getswfversion Method)

MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE
780 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...
472 ActionScript classes
Example
The following example draws thre movie clip instances, using the
getNextHighestDepth()
method as the
depth parameter of the createEmptyMovieClip() method, and labels each
movie clip them with its depth:
for (i = 0; i < 3; i++) {
drawClip(i);
}
function drawClip(n:Number):Void {
this.createEmptyMovieClip("triangle" + n, this.getNextHighestDepth());
var mc:MovieClip = eval("triangle" + n);
mc.beginFill(0x00aaFF, 100);
mc.lineStyle(4, 0xFF0000, 100);
mc.moveTo(0, 0);
mc.lineTo(100, 100);
mc.lineTo(0, 100);
mc.lineTo(0, 0);
mc._x = n * 30;
mc._y = n * 50
mc.createTextField("label", this.getNextHighestDepth(), 20, 50, 200, 200)
mc.label.text = mc.getDepth();
}
See also
getDepth (MovieClip.getDepth method), getInstanceAtDepth
(MovieClip.getInstanceAtDepth method)
, swapDepths (MovieClip.swapDepths
method)
, attachMovie (MovieClip.attachMovie method), duplicateMovieClip
(MovieClip.duplicateMovieClip method)
, createEmptyMovieClip
(MovieClip.createEmptyMovieClip 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 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 Lite 2.0

Table of Contents

Related product manuals