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

  • 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 209
188
EXTENDING FLASH PROFESSIONAL
Element object
Last updated 5/2/2011
// At least one symbol or bitmap is selected in the first layer, first frame.
var elt = fl.getDocumentDOM().getTimeline().layers[0].frames[0].elements[0];
elt.setPersistentData("myData","integer", 12);
if (elt.hasPersistentData("myData")){
fl.trace("myData = "+ elt.getPersistentData("myData"));
elt.removePersistentData( "myData" );
fl.trace("myData = "+ elt.getPersistentData("myData"));
}
element.getTransformationPoint()
Availability
Flash CS3 Professional.
Usage
element.getTransformationPoint()
Parameters
None.
Returns
A point (for example, {x:10, y:20}, where x and y are floating-point numbers) that specifies the position of the
transformation point (also origin point or zero point) within the element’s coordinate system.
Description
Method; gets the value of the specified element’s transformation point.
Transformation points are relative to different locations, depending on the type of item selected. For more
information, see
element.setTransformationPoint().
Example
The following example gets the transformation point for the third element in the ninth frame on the first layer in the
document. The
transPoint.x property gives the x coordinate of the transformation point. The transPoint.y
property gives the y coordinate of the transformation point.
var transPoint =
fl.getDocumentDOM().getTimeline().layers[0].frames[8].elements[2].getTransformationPoint();
See also
document.getTransformationPoint(), element.setTransformationPoint(), element.transformX,
element.transformY
element.hasPersistentData()
Availability
Flash MX 2004.
Zobrazit stránku 209
1 2 ... 205 206 207 208 209 210 211 212 213 214 215 ... 564 565

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

Žádné komentáře