Packagecom.adobe.flashpro
Classpublic class ToolObj
InheritanceToolObj Inheritance com.adobe.csawlib.CSHostObject

A ToolObj object is a JavaScript object that represents an individual tool. ToolObj can be obtained from the Tools object or from the activeTool property of the Tool object. Used only when creating extensible tools



Public Properties
 PropertyDefined By
  depth : int
[read-only] An integer specifying the depth of the tool in the popup.
ToolObj
  iconID : int
[read-only] An integer specifying the resource ID of the tool.
ToolObj
  position : int
[read-only] An integer specifying the position of the tool in the toolbar.
ToolObj
Public Methods
 MethodDefined By
  
enablePIControl(control:String, enable:Boolean):void
Enables or disables the specified control in a PI.
ToolObj
  
setIcon(file:String):void
Identifies a png file to use as a tool icon in the Flash toolbar.
ToolObj
  
setMenuString(menuStr:String):void
Sets the string that appears in the popup menu for the tool.
ToolObj
  
setOptionsFile(xmlFile:String):void
Associates an xml file with the tool to be displayed in a modal panel invoked by an "Options..." button in the PI.
ToolObj
  
setPI(pi:String):void
Set a particular property inspector to be used when the tool is activated.
ToolObj
  
setToolName(name:String):void
Assigns a name to the tool.
ToolObj
  
setToolTip(toolTip:String):void
Set the tooltip that is displayed when the mouse is held stationary over the tool icon.
ToolObj
  
showPIControl(control:String, show:Boolean):void
Shows or hides a control in the PI.
ToolObj
  
showTransformHandles(show:Boolean):void
This method is called in the configureTool function of extensible tools to indicate the free transform handles should be displayed when the tool is active.
ToolObj
Property Detail
depthproperty
depth:int  [read-only]

An integer specifying the depth of the tool in the popup. Used only when creating extensible tools.


Implementation
    public function get depth():int
iconIDproperty 
iconID:int  [read-only]

An integer specifying the resource ID of the tool. Extensible tools have an iconID of -1. Used only when creating extensible tools.


Implementation
    public function get iconID():int
positionproperty 
position:int  [read-only]

An integer specifying the position of the tool in the toolbar. Used only when creating extensible tools.


Implementation
    public function get position():int
Method Detail
enablePIControl()method
public function enablePIControl(control:String, enable:Boolean):void

Enables or disables the specified control in a PI. Used only when creating extensible tools

Parameters

control:String — (String) The name of the control to enable or disable. Legal values depend on the PI invoked by this tool (see setPI method). Used only when creating extensible tools. Shape PI has the following controls: stroke, fill, Text PI has the following controls: type, font, pointsize, color, bold, italic, direction, alignLeft, alignCenter, alignRight, alignJustify, spacing, position, autoKern, small, rotation, format, lineType, selectable, html, border, deviceFonts, varEdit, options, link, maxChars, target, Movie PI has the following controls: size, publish, background, framerate, player, profile
 
enable:Boolean — (Boolean) flag to enable or disable the control

setIcon()method 
public function setIcon(file:String):void

Identifies a png file to use as a tool icon in the Flash toolbar. If no cursors are specified the standard arrow cursor is displayed. Used only when creating extensible tools

Parameters

file:String — (String) Name of the png file to use as the icon. PNG file must be placed in tools directory.

setMenuString()method 
public function setMenuString(menuStr:String):void

Sets the string that appears in the popup menu for the tool. Used only when creating extensible tools.

Parameters

menuStr:String — (String) String to appear in the popup menu for the tool.

setOptionsFile()method 
public function setOptionsFile(xmlFile:String):void

Associates an xml file with the tool to be displayed in a modal panel invoked by an "Options..." button in the PI. Used only when creating extensible tools.

Parameters

xmlFile:String — (String) Name of the xml file that has the description of the tool's options.

setPI()method 
public function setPI(pi:String):void

Set a particular property inspector to be used when the tool is activated. Allowable values are "shape", "text", and "movie". The shape PI is used as a default if no PI is specified. Used only when creating extensible tools.

Parameters

pi:String — (String) The property inspector to invoke for this tool

setToolName()method 
public function setToolName(name:String):void

Assigns a name to the tool. This name is used in the configuration of the toolbar. The name is used only by the xml layout file. Used only when creating extensible tools.

Parameters

name:String — (String) The name of the tool

setToolTip()method 
public function setToolTip(toolTip:String):void

Set the tooltip that is displayed when the mouse is held stationary over the tool icon. Used only when creating extensible tools.

Parameters

toolTip:String — (String) The tooltip to use for the tool.

showPIControl()method 
public function showPIControl(control:String, show:Boolean):void

Shows or hides a control in the PI. Used only when creating extensible tools.

Parameters

control:String — (String) The name of the control to enable or disable. Legal values depend on the PI invoked by this tool (see setPI method). Used only when creating extensible tools. Shape PI has the following controls: stroke, fill, Text PI has the following controls: type, font, pointsize, color, bold, italic, direction, alignLeft, alignCenter, alignRight, alignJustify, spacing, position, autoKern, small, rotation, format, lineType, selectable, html, border, deviceFonts, varEdit, options, link, maxChars, target, Movie PI has the following controls: size, publish, background, framerate, player, profile
 
show:Boolean — (Boolean) True to show the control, false to hide the control.

showTransformHandles()method 
public function showTransformHandles(show:Boolean):void

This method is called in the configureTool function of extensible tools to indicate the free transform handles should be displayed when the tool is active. Used only when creating extensible tools.

Parameters

show:Boolean — (Boolean) true to show the handles, false not to.