Layer.framecount; Layer.frames - MACROMEDIA FLASH MX 2004-FLASH JAVASCRIPT DICTIONARY Manual

Flash javascript dictionary
Hide thumbs Also See for FLASH MX 2004-FLASH JAVASCRIPT DICTIONARY:
Table of Contents

Advertisement

Example
The following example stores the value of the first layer in the
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
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
Example
The following example sets the variable
in the current document:
var frameArray = fl.getDocumentDOM().getTimeline().layers[0].frames;
To determine if a frame is a keyframe, check whether the
the array index, as shown in the following example:
var frameArray = fl.getDocumentDOM().getTimeline().layers[0].frames;
var n = frameArray.length;
for (i=0; i<n; i++) {
if (i==frameArray[i].startFrame) {
alert("Keyframe at: " + i);
Frame
object).
to the array of Frame objects for the frames
frameArray
frame.startFrame
variable:
colorValue
variable:
fcNum
property matches
Layer object
209

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash mx 2004 - actionscript

Table of Contents