![MACROMEDIA FLASH 8-EXTENDING FLASH Manual Download Page 331](http://html1.mh-extra.com/html/macromedia/flash-8-extending-flash/flash-8-extending-flash_manual_3348049331.webp)
Matrix object
331
Example
The
a
and
d
properties in a matrix represent scaling. In the following example, the values are
set to 2 and 3, respectively, to scale the selected object to two times its width and three times
its height:
var mat = fl.getDocumentDOM().selection[0].matrix;
mat.a = 2;
mat.d = 3;
fl.getDocumentDOM().selection[0].matrix = mat;
You can rotate an object by setting the
a
,
b
,
c
, and
d
matrix properties relative to one another,
where
a = d
and
b = -c
. For example, values of 0.5, 0.8, -0.8, and 0.5 rotate the object 60º:
var mat = fl.getDocumentDOM().selection[0].matrix;
mat.a = 0.5;
mat.b = 0.8;
mat.c = 0.8*(-1);
mat.d = 0.5;
fl.getDocumentDOM().selection[0].matrix = mat;
You can set
a = d = 1
and
c = b = 0
to reset the object back to its original shape.
matrix.b
Availability
Flash MX 2004.
Usage
matrix.b
Description
Property; a floating-point value that specifies the (0,1) element in the matrix. This value
represents the vertical skew of a shape; it causes Flash to move the shape’s right edge along the
vertical axis.
The
matrix.b
and
matrix.c
properties in a matrix represent skewing (see
matrix.c
).
Summary of Contents for FLASH 8-EXTENDING FLASH
Page 1: ...Extending Flash...
Page 38: ...38 Top Level Functions and Methods...
Page 532: ...532 Objects...
Page 554: ...554 C Level Extensibility...