扩展 Flash |
|
|
|
| 顶级函数和方法 > 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 );
}
|
|
|
|