Hello,
How can I put icon in list box
I tried this.my_list.addItem(this.data, iconMale); where iconMale is a movie with this linkage
I used the new listbox component with code for icon in the FCFSelectableItem:
// EXTEND this method to change the rendering of the content in an item (multiple labels, icons, etc)
FCFSelectableItemClass.prototype.displayContent = function(itmObj, selected)
{
//:: Begin choosing the text to display, by introspecting the object a little.
var tmpLabel = “”;
if (itmObj.label!=undefined) {
tmpLabel = itmObj.label;
} else {
if (typeof(itmObj)==“object”) {
for (var i in itmObj) {
if (i!=“ID”) {
tmpLabel = itmObj + ", " + tmpLabel;
}
}
tmpLabel = tmpLabel.substring(0,tmpLabel.length-2);*
- } else {
tmpLabel = itmObj;
}
}
//:: End choosing text to display; display it.
if (this.fLabel_mc.labelField.text!=tmpLabel) {
this.fLabel_mc.setLabel(tmpLabel);
}
// color the label.
var clr = (selected) ? this.controller.styleTable.textSelected.value : this.controller.styleTable.textColor.value;
if (clr==undefined) {
clr = (selected) ? 0xffffff : 0x000000;
}
this.fLabel_mc.setColor(clr);*
}
Where is the problem ?