Adobe Extending Flash Professional CS5 Uživatelský manuál Strana 360

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 565
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 359
338
Last updated 5/2/2011
Chapter 27: Math object
Availability
Flash MX 2004.
Description
The Math object is available as a read-only property of the flash object; see fl.Math. This object provides methods that
perform common mathematical operations.
Method summary
The following methods are available for the Math object:
Math.concatMatrix()
Availability
Flash MX 2004.
Usage
Math.concatMatrix(mat1, mat2)
Parameters
mat1, mat2 Specify the Matrix objects to be concatenated (see Matrix object). Each parameter must be an object with
fields a, b, c, d, tx, and ty.
Returns
A concatenated object matrix.
Description
Method; performs a matrix concatenation and returns the result.
Example
The following example stores the currently selected object in the elt variable, multiplies the object matrix by the view
matrix, and stores that value in the
mat variable:
var elt = fl.getDocumentDOM().selection[0];
var mat = fl.Math.concatMatrix( elt.matrix , fl.getDocumentDOM().viewMatrix );
Method Description
Math.concatMatrix() Performs a matrix concatenation and returns the result.
Math.invertMatrix() Returns the inverse of the specified matrix.
Math.pointDistance() Computes the distance between two points.
Zobrazit stránku 359
1 2 ... 355 356 357 358 359 360 361 362 363 364 365 ... 564 565

Komentáře k této Příručce

Žádné komentáře