Adobe Extending Flash Professional CS5 Manuale Utente Pagina 363

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 565
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 362
341
Last updated 5/2/2011
Chapter 28: Matrix object
Availability
Flash MX 2004.
Description
The Matrix object represents a transformation matrix.
Property summary
The following properties are available for the Matrix object:
matrix.a
Availability
Flash MX 2004.
Usage
matrix.a
Description
Property; a floating-point value that specifies the (0,0) element in the transformation matrix. This value represents the
scale factor of the object’s x-axis.
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º:
Property Description
matrix.a A floating-point value that specifies the (0,0) element in the transformation matrix.
matrix.b A floating-point value that specifies the (0,1) element in the matrix.
matrix.c A floating-point value that specifies the (1,0) element in the matrix.
matrix.d A floating-point value that specifies the (1,1) element in the matrix.
matrix.tx A floating-point value that specifies the x-axis location of a symbol’s registration point or the center of a
shape.
matrix.ty A floating-point value that specifies the y-axis location of a symbol’s registration point or the center of a
shape.
Vedere la pagina 362
1 2 ... 358 359 360 361 362 363 364 365 366 367 368 ... 564 565

Commenti su questo manuale

Nessun commento