User Guide
ToolObj object 351
Example
The following command in an extensible tool’s JavaScript file will set Flash to not show the stroke
options in the Property inspector for that tool:
theTool.enablePIControl( "stroke", false);
toolObj.position
Availability
Flash MX 2004.
Usage
toolObj.position
Description
Read-only property; an integer specifying the position of the tool in the Tools panel.
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 Configuration/Tools folder.
Returns
Nothing.
Description
Method; identifies a PNG file to use as a tool icon in the Flash Tools panel.
Example
The following example specifies that the image in the arrow1.png file should be used as the icon
for the tool named
theTool.
theTool.setIcon("arrow1.png");