EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - D (Matrix.D Property)

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...
772 ActionScript classes
Example
The following example uses
myMatrix as a parameter for the MovieClip object's
beginGradientFill() method.
import flash.geom.Matrix;
var myMatrix:Matrix = new Matrix();
trace(myMatrix.toString()); // (a=1, b=0, c=0, d=1, tx=0, ty=0)
myMatrix.createGradientBox(200, 200, 0, 50, 50);
trace(myMatrix.toString()); // (a=0.1220703125, b=0, c=0, d=0.1220703125,
tx=150, ty=150)
var depth:Number = this.getNextHighestDepth();
var mc:MovieClip = this.createEmptyMovieClip("mc_" + depth, depth);
var colors:Array = [0xFF0000, 0x0000FF];
var alphas:Array = [100, 100];
var ratios:Array = [0, 0xFF];
mc.beginGradientFill("linear", colors, alphas, ratios, myMatrix);
mc.lineTo(0, 300);
mc.lineTo(300, 300);
mc.lineTo(300, 0);
mc.lineTo(0, 0);
See also
beginGradientFill (MovieClip.beginGradientFill method)
d (Matrix.d property)
public d : Number
The value in the second row and second column of the Matrix object, which affects the
positioning of pixels along the y axis when scaling or rotating an image.
Availability: ActionScript 1.0; Flash Player 8
Example
The following example creates the Matrix object
myMatrix and sets its d value.
import flash.geom.Matrix;
var myMatrix:Matrix = new Matrix();
trace(myMatrix.d); // 1
myMatrix.d = 2;
trace(myMatrix.d); // 2

Table of Contents

Related product manuals