beautypg.com

Parameter.value – Adobe Extending Flash Professional CS5 User Manual

Page 376

background image

354

EXTENDING FLASH PROFESSIONAL

Parameter object

Last updated 5/2/2011

Example
The following example removes the element at index 1 from the

labelPlacement

parameter of a component:

// Select an instance of a Button component on the Stage.

var parms = fl.getDocumentDOM().selection[0].parameters;

var values = parms[2].value;

fl.trace("--Original--");

for(var prop in values){

fl.trace("labelPlacement value = " + values[prop].value);

}

parms[2].removeItem(1);

var newValues = parms[2].value;

fl.trace("--After Removing Item--");

for(var prop in newValues){

fl.trace("labelPlacement value = " + newValues[prop].value);

}

The following example removes the element at index 1 from the

autoKeyNav

parameter of a screen:

// Open a presentation document.

var parms = fl.getDocumentDOM().screenOutline.screens[1].parameters;

var values = parms[0].value;

fl.trace("--Original--");

for(var prop in values){

fl.trace("autoKeyNav value = " + values[prop].value);

}

parms[0].removeItem(1);

var newValues = parms[0].value;

fl.trace("--After Removing Item--");

for(var prop in newValues){

fl.trace("autoKeyNav value = " + newValues[prop].value);

}

parameter.value

Availability
Flash MX 2004.

Usage

parameter.value

Description
Property; corresponds to the Value field in the Parameters tab of the Component inspector, the Parameters tab of the
Property inspector, or the screen Property inspector. The type of the

value

property is determined by the

valueType

property for the parameter (see

parameter.valueType

).

This manual is related to the following products: