Adobe Extending Flash Professional CS4 Manuel d'utilisateur Page 224

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 560
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 223
202
EXTENDING FLASH CS4 PROFESSIONAL
Fill object
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".
Vue de la page 223
1 2 ... 219 220 221 222 223 224 225 226 227 228 229 ... 559 560

Commentaires sur ces manuels

Pas de commentaire