configureTool()

可用性

Flash MX 2004。

用法

function configureTool() {
    // 语句
}

参数

无。

返回

无。

说明

函数;在 Flash 打开并将可扩展工具加载到"工具"面板时调用。使用此函数,可以设置 Flash 关于该工具所要了解的任何信息。

示例

下面的示例显示此函数的两种可能的实现:

function configureTool() {
    theTool = fl.tools.activeTool;
    theTool.setToolName("myTool");
    theTool.setIcon("myTool.png");
    theTool.setMenuString("My Tool's menu string");
    theTool.setToolTip("my tool's tool tip");
    theTool.setOptionsFile( "mtTool.xml" );
}

function configureTool() {
    theTool = fl.tools.activeTool; 
    theTool.setToolName("ellipse"); 
    theTool.setIcon("Ellipse.png");
    theTool.setMenuString("Ellipse");
    theTool.setToolTip("Ellipse");
    theTool.showTransformHandles( true );
}