Adobe Extending Flash Professional CS4 Manuale Utente Pagina 516

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 560
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 515
494
EXTENDING FLASH CS4 PROFESSIONAL
ToolObj object
Example
The following commands in the mouseDown() method of a tool’s JavaScript file will show that tool’s position in the
Tools panel as an integer in the Output panel:
myToolPos = fl.tools.activeTool.position;
fl.trace(myToolPos);
toolObj.setIcon()
Availability
Flash MX 2004.
Usage
toolObj.setIcon(file)
Parameters
file A string that specifies the name of the PNG file to use as the icon. The PNG file must be placed in the same folder
as the JSFL file.
Returns
Nothing.
Description
Method; identifies a PNG file to use as a tool icon in the Tools panel. This method is used only when you create
extensible tools.
Example
The following example specifies that the image in the PolyStar.png file should be used as the icon for the tool named
PolyStar. This code is taken from the sample PolyStar.jsfl file (see “Sample PolyStar tool” on page 14):
theTool = fl.tools.activeTool;
theTool.setIcon("PolyStar.png");
toolObj.setMenuString()
Availability
Flash MX 2004.
Usage
toolObj.setMenuString(menuStr)
Parameters
menuStr A string that specifies the name that appears in the pop-up menu as the name for the tool.
Returns
Nothing.
Vedere la pagina 515
1 2 ... 511 512 513 514 515 516 517 518 519 520 521 ... 559 560

Commenti su questo manuale

Nessun commento