![]() ![]() ![]() | |
![]() | |
![]() | |
![]() |
Flash Player 6.0.79.
Flash MX 2004.
listInstance
.iconFunction
Property; specifies a function to be used to determine which icon each row will use to display its item. This function receives a parameter, item
, which is the item being rendered, and must return a string representing the icon's symbol identifier.
The following example adds icons that indicate whether a file is an image or a text document. If the data.fileExtension
field contains a value of "jpg"
or "gif",
the icon used will be "pictureIcon"
, and so on:
list.iconFunction = function(item){ var type = item.data.fileExtension; if (type=="jpg" || type=="gif") { return "pictureIcon"; } else if (type=="doc" || type=="txt") { return "docIcon"; } }
![]() | |
![]() | |
![]() | |
![]() ![]() ![]() |