Identity (Matrix.identity Method) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

var pointMc_1:MovieClip = createRectangle(10, 10, 0x00FF00);
pointMc_1._x = deltaTransformedPoint.x;
function createRectangle(width:Number, height:Number,
color:Number):MovieClip {
var depth:Number = this.getNextHighestDepth();
var mc:MovieClip = this.createEmptyMovieClip("mc_" + depth, depth);
mc.beginFill(color);
mc.lineTo(0, height);
mc.lineTo(width, height);
mc.lineTo(width, 0);
mc.lineTo(0, 0);
return mc;
}

identity (Matrix.identity method)

public identity() : Void
Sets each matrix property to a value that cause a transformed movie clip or geometric
construct to be identical to the original.
After calling the
identity()
b=0, c=0, d=1, tx=0, ty=0
In matrix notation the identity matrix looks like this:
Availability: ActionScript 1.0; Flash Player 8
Example
The following example demonstrates that calling the
Matrix object to an identity Matrix object. The number and types of transformations applied
to the original Matrix object beforehand are irrelevant. If
values are converted to (a=1, b=0, c=0, d=1, tx=0, ty=0).
import flash.geom.Matrix;
var myMatrix:Matrix = new Matrix(2, 0, 0, 2, 0 ,0);
trace(myMatrix.toString()); // (a=2, b=0, c=0, d=2, tx=0, ty=0)
myMatrix.rotate(Math.atan(3/4));
trace(myMatrix.toString()); // (a=1.6, b=1.2, c=-1.2, d=1.6, tx=0, ty=0)
774
ActionScript classes
method, the resulting matrix has the following properties:
.
method converts the calling
identity()
is called, the Matrix
identity()
a=1,

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF