Adobe Extending Flash Professional CS4 Manuel d'utilisateur Page 213

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 560
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 212
191
EXTENDING FLASH CS4 PROFESSIONAL
Element object
Example
The following example stores the Layer object that contains the element in the theLayer variable:
var theLayer = element.layer;
element.left
Availability
Flash MX 2004.
Usage
element.left
Description
Read-only property; a float value that represents the left side of the element. The value of element.left is relative to
the upper left of the Stage for elements that are in a scene and is relative to the symbol’s registration point (also origin
point or zero point) if the element is stored within a symbol. Use
document.setSelectionBounds() or
document.moveSelectionBy() to set this property.
Example
The following example illustrates how the value of this property changes when an element is moved:
// Select an element on the Stage and then run this script.
var sel = fl.getDocumentDOM().selection[0];
fl.trace("Left (before) = " + sel.left);
fl.getDocumentDOM().moveSelectionBy({x:100, y:0});
fl.trace("Left (after) = " + sel.left);
See the element.elementType example.
element.locked
Availability
Flash MX 2004.
Usage
element.locked
Description
Property; a Boolean value: true if the element is locked; false otherwise. If the value of element.elementType is
"shape", this property is ignored.
Example
The following example locks the first element in the first frame, top layer:
// Similar to Modify > Arrange > Lock:
fl.getDocumentDOM().getTimeline().layers[0].frames[0].elements[0].locked = true;
Vue de la page 212
1 2 ... 208 209 210 211 212 213 214 215 216 217 218 ... 559 560

Commentaires sur ces manuels

Pas de commentaire