Reputation: 21
I create a list Companents in as3, and I added item using list.addItem({label: "Topman"});
while i get the value of Selected list trace(list.selectedItem);
it returns [object Object].
How can I solve this problem? Anybody help me. Thanks in advance!
Upvotes: 0
Views: 4076
Reputation:
Try this:
if ( list.selectedItem != null && list.selectedItem.hasOwnProperty("label") ) {
trace( "Selected label is: " + list.selectedItem.label );
}
Upvotes: 4