
292
EXTENDING FLASH PROFESSIONAL
Frame object
Last updated 5/2/2011
frame.isMotionObject()
Availability
Flash Professional CS5.
Usage
Frame.isMotionObject()
Description
Method; a Boolean value. Lets you know whether the current selection is a motion object.
Example
The following example returns a trace statement informing you that the current selection is or is not a motion object.
var my_tl = doc.getTimeline() ;
this.getCurrentFrame = function(){
var layer = my_tl.layers[my_tl.currentLayer];<
var frame = layer.frames[my_tl.currentFrame];
return frame;
}
var theFrame = getCurrentFrame();
if(theFrame.isMotionObject()) {
fl.trace("This selection is motion.");
}else{
fl.trace("This selection is not motion.");
}
frame.labelType
Availability
Flash MX 2004.
Usage
frame.labelType
Description
Property; a string that specifies the type of Frame name. Acceptable values are "none", "name", "comment", and
"anchor". Setting a label to "none" clears the frame.name property.
Example
The following example sets the name of the first frame in the top layer to "First Frame" and then sets its label
to
"comment":
fl.getDocumentDOM().getTimeline().layers[0].frames[0].name = 'First Frame';
fl.getDocumentDOM().getTimeline().layers[0].frames[0].labelType = 'comment';
Komentáře k této Příručce