Adobe Extending Flash Professional CS5 Manual de usuario Pagina 223

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 565
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 222
201
EXTENDING FLASH PROFESSIONAL
Fill object
Last updated 5/2/2011
Example
The following example sets the fill color of the current selection:
var fill = fl.getDocumentDOM().getCustomFill();
fill.color = "#FFFFFF";
fl.getDocumentDOM().setCustomFill( fill );
fill.colorArray
Availability
Flash MX 2004.
Usage
fill.colorArray
Description
Property; an array of colors in the gradient, expressed as integers. This property is available only if the value of the
fill.style property is either "radialGradient" or "linearGradient". See fill.style
Example
The following example displays the color array of the current selection, if appropriate, in the Output panel:
var fill = fl.getDocumentDOM().getCustomFill();
if(fill.style == "linearGradient" || fill.style == "radialGradient")
alert(fill.colorArray);
The following example sets the fill to the specified linear gradient:
var fill = fl.getDocumentDOM().getCustomFill();
fill.style = "linearGradient";
fill.colorArray = ["#00ff00","#ff00ff"];
fill.posArray = [0, 255];
fl.getDocumentDOM().setCustomFill(fill);
fill.focalPoint
Availability
Flash 8.
Usage
fill.focalPoint
Description
Property; an integer that specifies the gradient focal point horizontal offset from the transformation point. A value of
10, for example, would place the focal point at 10/255 of the distance from the transformation point to the edge of the
gradient. A value of -255 would place the focal point at the left boundary of the gradient. The default value is 0.
This property is available only if the value of the fill.style property is "radialGradient".
Vista de pagina 222
1 2 ... 218 219 220 221 222 223 224 225 226 227 228 ... 564 565

Comentarios a estos manuales

Sin comentarios