Adobe Extending Flash Professional CS5 Manuale Utente Pagina 126

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 565
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 125
104
EXTENDING FLASH PROFESSIONAL
Document object
Last updated 5/2/2011
Description
Method; retrieves the fill object of the selected shape or, if specified, of the Tools panel and Property inspector.
Example
The following example gets the fill object of the selection and then changes the selection’s color to white:
var fill = fl.getDocumentDOM().getCustomFill();
fill.color = '#FFFFFF';
fill.style = "solid";
fl.getDocumentDOM().setCustomFill(fill);
The following example returns the fill object of the Tools panel and Property inspector and then changes the color
swatch to a linear gradient:
var fill = fl.getDocumentDOM().getCustomFill("toolbar");
fill.style = "linearGradient";
fill.colorArray = [ 0x00ff00, 0xff0000, 0x0000ff ];
fill.posArray = [0, 100, 200];
fl.getDocumentDOM().setCustomFill( fill );
See also
document.setCustomFill()
document.getCustomStroke()
Availability
Flash MX 2004.
Usage
document.getCustomStroke([locationOfStroke])
Parameters
locationOfStroke A string that specifies the location of the stroke object. The following values are valid:
"toolbar", if set, returns the stroke object of the Tools panel and Property inspector.
"selection", if set, returns the stroke object of the selection.
If you omit this parameter, it defaults to "selection". If there is no selection, it returns undefined. This
parameter is optional.
Returns
The Stroke object specified by the locationOfStroke parameter, if successful; otherwise, it returns undefined.
Description
Returns the stroke object of the selected shape or, if specified, of the Tools panel and Property inspector.
Example
The following example returns the current stroke settings of the selection and changes the stroke thickness to 2:
Vedere la pagina 125
1 2 ... 121 122 123 124 125 126 127 128 129 130 131 ... 564 565

Commenti su questo manuale

Nessun commento