Frame.is3dmotionobject() – Adobe Extending Flash Professional CS5 User Manual
Page 313

291
EXTENDING FLASH PROFESSIONAL
Frame object
Last updated 5/2/2011
Example
The following example returns a trace statement informing you if the current selection has a motion path.
var doc = fl.getDocumentDOM();
var my_tl = doc.getTimeline() ;
t his .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()){
if (theFrame.hasMotionPath()){
fl.trace("There is a motion path");
}else{
fl.trace("There is no motion path");
}
frame.is3DMotionObject()
Availability
Flash Professional CS5.
Usage
Frame.is3DMotionObject()
Description
Method; a Boolean value. Lets you know whether the current selection is a 3D motion object.
Example
The following example returns a trace statement informing you that the current selection is or is not a 3D motion
object.
var doc = fl.getDocumentDOM();
va r my_tl = doc.getTimeline();
this.getCurrentFr ame = func t i o n(){
var layer = my_tl.layers[my_ t l. c u r re ntL aye r];
var frame = layer .frame s[my_t l.curr entFrame] ;
return frame;
}
var theFrame = getCurrentFrame();
if(theFrame.isMotionObject() && theFrame.is3DMotionObject()){
fl.trace("This selection is 3D Motion");
}else{
fl.trace("This selection is not 3D motion");
}