Adobe Extending Flash Professional CS5 Bedienungsanleitung Seite 342

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 565
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 341
320
EXTENDING FLASH PROFESSIONAL
Layer object
Last updated 5/2/2011
Example
The following example stores the value of the first layer in the colorValue variable:
var colorValue = fl.getDocumentDOM().getTimeline().layers[0].color;
The following example shows three ways to set the color of the first layer to red:
fl.getDocumentDOM().getTimeline().layers[0].color=16711680;
fl.getDocumentDOM().getTimeline().layers[0].color="#ff0000";
fl.getDocumentDOM().getTimeline().layers[0].color=0xFF0000;
layer.frameCount
Availability
Flash MX 2004.
Usage
layer.frameCount
Description
Read-only property; an integer that specifies the number of frames in the layer.
Example
The following example stores the number of frames in the first layer in the fcNum variable:
var fcNum = fl.getDocumentDOM().getTimeline().layers[0].frameCount;
layer.frames
Availability
Flash MX 2004.
Usage
layer.frames
Description
Read-only property; an array of Frame objects (see Frame object).
Example
The following example sets the variable frameArray to the array of Frame objects for the frames in the current
document:
var frameArray = fl.getDocumentDOM().getTimeline().layers[0].frames;
To determine if a frame is a keyframe, check whether the frame.startFrame property matches the array index, as
shown in the following example:
Seitenansicht 341
1 2 ... 337 338 339 340 341 342 343 344 345 346 347 ... 564 565

Kommentare zu diesen Handbüchern

Keine Kommentare