Icon in listbox

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 ?

I think you might have to use the cellRenderer API to do that. Do a google search, there are some resources out there but not many. I’m not sure that this is the case but it’s a hunch. CellRenderer API is a little confusing if you aren’t used to external AS classes, but there are some resources to be found on the internet.

–EP