Adobe Extending Flash Professional CS5 Manual de usuario Pagina 318

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 565
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 317
296
EXTENDING FLASH PROFESSIONAL
Frame object
Last updated 5/2/2011
var doc = fl.getDocumentDOM();
var my_tl = doc.getTimeline();
t his.getCurrentFrame = function(){
var layer = my_tl.layers[my_tl. c u rrentLayer];
var frame = layer.frames[my_tl.currentFrame];
return frame;
}
var theFrame = getCurrentFrame();
if(theFrame.isMotionObject()){
if (theFrame.hasMotionPath()){
theFrame.selectMotionPath(true);
}
else{
fl.trace("There is no motion path");
}
}else{
fl.trace("It is no motion");
}
frame.setCustomEase()
Availability
Flash 8.
Usage
frame.setCustomEase(property, easeCurve)
Parameters
property A string that specifies the property the ease curve should be used for. Acceptable values are "all",
"position", "rotation", "scale", "color", and "filters".
easeCurve An array of objects that defines the ease curve. Each array element must be a JavaScript object with x and
y properties.
Returns
Nothing.
Description
Method; specifies an array of control point and tangent endpoint coordinates that describe a cubic Bézier curve to be
used as a custom ease curve. This array is constructed by the horizontal (ordinal: left to right) position of the control
points and tangent endpoints.
Example
The following example sets the ease curve for all properties of the first frame in the first layer to the Bézier curve
specified by the
easeCurve array:
var theFrame = fl.getDocumentDOM().getTimeline().layers[0].frames[0];
var easeCurve = [ {x:0,y:0}, {x:.3,y:.3}, {x:.7,y:.7}, {x:1,y:1} ];
theFrame.setCustomEase( "all", easeCurve );
Vista de pagina 317
1 2 ... 313 314 315 316 317 318 319 320 321 322 323 ... 564 565

Comentarios a estos manuales

Sin comentarios