Adobe Extending Flash Professional CS5 Uživatelský manuál Strana 309

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 565
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 308
287
EXTENDING FLASH PROFESSIONAL
Frame object
Last updated 5/2/2011
Example
The following example converts the selected motion object to a 2D motion object:
var doc = fl.getDocumentDOM();
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() && the()){
theFrame.convertMotionObjectTo2D();
}else{
fl.trace("It isn't motion or it's already a 2D motion");
}
frame.convertMotionObjectTo3D()
Availability
Flash Professional CS5.
Usage
frame.convertMotionObjectTo3D()
Description
Method; Converts the selected motion object to a 3D motion object.
Example
The following example converts the selected motion object to a 3D motion object:
var doc = fl.getDocumentDOM();
v a r my_tl = doc.getTimeline();
this.getCurrentF r ame = functi on() {
var layer = my_tl.layers[my _tl.cu rrentLa yer];
var frame = layer.frames[my_tl.currentFrame ];
retur n frame;}
var theFrame = getCurrentFrame();
if(theFrame.isMotionObject() && !theFrame.is3DMotionObject()){
theFrame.convertMotionObjectTo3D();
}else{
fl.trace("It isn't motion or it's already a 3D motion");
}
frame.actionScript
Availability
Flash MX 2004.
Zobrazit stránku 308
1 2 ... 304 305 306 307 308 309 310 311 312 313 314 ... 564 565

Komentáře k této Příručce

Žádné komentáře