List.setPropertiesAt()

Availability

Flash Player 6 (6.0.79.0).

Edition

Flash MX 2004.

Usage

listInstance.setPropertiesAt(index, styleObj)

Parameters

index A number greater than 0 or less than List.length indicating the index of the item to change.

styleObj An object that enumerates the properties and values to set.

Returns

Nothing.

Description

Method; applies the specified properties to the specified item. The supported properties are icon and backgroundColor.

Example

The following example changes the background color of the third item to red and gives it an icon. To try this code, drag a List component to the Stage and give it the instance name my_list. Next, add a MovieClip/Graphic symbol to the library with a linkage identifier of "file". Add the following code to Frame 1 in the timeline:

var my_list:mx.controls.List;

my_list.setSize(200, 100);

my_list.addItem({data:"flash", label:"Flash"});
my_list.addItem({data:"dreamweaver", label:"Dreamweaver"});
my_list.addItem({data:"coldfusion", label:"ColdFusion"});

my_list.setPropertiesAt(2, {backgroundColor:0xFF0000, icon: "file"});

Flash CS3


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/9.0/main/00003195.html