User Guide

784 List component
List.iconField
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004.
Usage
listInstance.iconField
Description
Property; specifies the name of a field to be used as an icon identifier. If the field has a value of
undefined, the default icon specified by the defaultIcon style is used. If the defaultIcon
style is
undefined, no icon is used.
Example
The following example sets the iconField property to the icon property of each item. To try
this code, drag a List component to the Stage, give it the instance name my_list, and create
three symbols with the instance names
flash, dreamweaver, and cf respectively. Add the
following code to Frame 1 in the timeline:
/**
Requires:
- List component on Stage (instance name: my_list)
- MovieClip/Graphic symbol in the Library with Linkage ID of "flash"
- MovieClip/Graphic symbol in the Library with Linkage ID of "dreamweaver"
- MovieClip/Graphic symbol in the Library with Linkage ID of "cf"
*/
var my_list:mx.controls.List;
my_list.setSize(200, 100);
my_list.addItem({data:"flash", label:"Flash", icon:"flash"});
my_list.addItem({data:"dreamweaver", label:"Dreamweaver",
icon:"dreamweaver"});
my_list.addItem({data:"coldfusion", label:"ColdFusion", icon:"cf"});
my_list.iconField = "icon";
See also
List.iconFunction