User Guide

238 Chapter 3: Objects
Description
Property; a string that specifies the category property for the screen parameter or
componentInstance parameter. This property provides an alternative way of presenting a list of
parameters. This functionality is not available through the Flash user interface.
parameter.insertItem()
Availability
Flash MX 2004.
Usage
parameter.insertItem(index, name, value, type)
Parameters
index
A zero-based integer index that indicates where the item will be inserted in the list,
object, or array. If the index is 0, the item is inserted at the beginning of the list. If index value is
greater than the list size, the new item is inserted at the end of the array.
name A string that specifies the name of the item to insert. This is a required parameter for
object parameters.
value A string that specifies the value of the item to insert.
type A string that specifies the type of item to insert.
Returns
Nothing.
Description
Method; if a parameter is a list, object, or array, the value property is an array. Use this method to
insert a value into the array.
Example
The following example inserts the value of "New Value" into the labelPlacement parameter:
// select an instance of a Button component on the Stage
var parms = fl.getDocumentDOM().selection[0].parameters;
parms[2].insertItem(0, "name", "New Value", "String");
var values = parms[2].value;
for(var prop in values){
fl.trace("labelPlacement parameter value = " + values[prop].value);
}
parameter.listIndex
Availability
Flash MX 2004.
Usage
parameter.listIndex