jusi5
05-27-2006, 03:33 AM
Does anyone know how to add an icon to a list box component when the list box is populated by an XML file?
The code below puts my icon "intro" in each of the 6 rows I have in the listbox. All the other if statements are ignored.
Here is a short description of what is in the code. .desc.Introduction comes from the XML file. The text "Introduction" is the text that goes into the listbox. "intro" is the linkage ID of the movie clip that contains the image that will be the icon. I only have 2 if statements for this example, but eventually there will be 6 to input 6 icons in each row of the list box.
videoList.iconFunction = function(item) {
if(item.data.attributes.desc.Introduction !=1) return "intro";
if(item.data.attributes.desc.Dancing !=1) return "womenDancing";
}
Can anyone help?
The code below puts my icon "intro" in each of the 6 rows I have in the listbox. All the other if statements are ignored.
Here is a short description of what is in the code. .desc.Introduction comes from the XML file. The text "Introduction" is the text that goes into the listbox. "intro" is the linkage ID of the movie clip that contains the image that will be the icon. I only have 2 if statements for this example, but eventually there will be 6 to input 6 icons in each row of the list box.
videoList.iconFunction = function(item) {
if(item.data.attributes.desc.Introduction !=1) return "intro";
if(item.data.attributes.desc.Dancing !=1) return "womenDancing";
}
Can anyone help?