User Guide
Creating the ActionScript class file 159
The ComponentTask tag has the following syntax:
[ComponentTask [taskName,taskFile [,otherFile[,…]]]
The taskName and taskFile attributes are required. The otherFile attribute is optional
The following example associates
SetUp.jsfl and AddNewSymbol.jsfl with the component
class named myComponent. The
AddNewSymbol.jsfl requires a testXML.xml file and is
specified in the
otherFile attribute.
[ComponentTask("Do Some Setup","SetUp.jsfl")]
[ComponentTask("Add a new Symbol","AddNewSymbol.jsfl","testXML.xml")]
class myComponent{
//...
}
The following table describes the attributes of the ComponentTask tag:
Defining component parameters
When building a component, you can add parameters that define its appearance and
behavior. The most commonly used parameters appear as authoring parameters in the
Component inspector and Property inspector. You can also set all inspectable and collection
parameters with ActionScript. You define these properties in the component class file by using
the Inspectable tag (see “About the Inspectable tag” on page 151).
Attribute Type Description
taskName
String (Required) The name of the task as a string. This name is
displayed in the Tasks pop-up menu that appears on the Schema
tab of the Component inspector.
taskFile
String (Required) The name of the JSFL file that implements the tasks
within the authoring environment. The file must reside in the same
folder as your component FLA when you export your component
as a SWC file.
otherFile
String (Optional) One or more names of files that are required by the
JSFL file such as an XML file. The file(s) must reside in the same
folder as your component FLA when you export your component
as a SWC file.