beautypg.com

Toolobj.setoptionsfile() – Adobe Extending Flash Professional CS5 User Manual

Page 523

background image

501

EXTENDING FLASH PROFESSIONAL

ToolObj object

Last updated 5/2/2011

Description
Method; sets the string that appears in the pop-up menu as the name for the tool. This method is used only when you
create extensible tools.

Example
The following example specifies that the tool named

theTool

should display the name “PolyStar Tool” in its pop-up

menu. This code is taken from the sample PolyStar.jsfl file (see

Sample PolyStar tool

” on page 13):

theTool = fl.tools.activeTool;

theTool.setMenuString("PolyStar Tool");

toolObj.setOptionsFile()

Availability
Flash MX 2004.

Usage

toolObj.setOptionsFile(xmlFile)

Parameters

xmlFile

A string that specifies the name of the XML file that has the description of the tool’s options. The XML file

must be placed in the same folder as the JSFL file.

Returns
Nothing.

Description
Method; associates an XML file with the tool. The file specifies the options to appear in a modal panel that is invoked
by an Options button in the Property inspector. You would usually use this method in the

configureTool()

function

inside your JSFL file. See

configureTool()

.

For example, the PolyStar.xml file specifies three options associated with the Polygon tool:

This manual is related to the following products: