I have this code as a change function on a DropDownList in Flash Builder:
public function chooseCategoryDDL_changeHandler(event:IndexChangeEvent):void {
var para:Object = new Object();
para.action = "changecategoryxml";
para.book_class = event.selectedItem.book_class;
if (event.selectedItem > -1 ) {
changeCategory.send(para);
}
However I get a code hint stating that there’s ‘access of undefined property selectedItem’. Yet when I set the para.book_class to be:
para.book_class = event.IndexChangeEvent.book_class;
The code hinting then states error ‘1078: Label must be simple identifier’. What i’m trying to do is when a user clicks on a selected item from the DDL, the ‘changecategoryxml’ function is called if the selected item is > -1 (as the DDL is an ArrayCollection). Please can anyone help me with the correct syntax?
Any help is greatly appreciated. Thank you.
EDIT: I now know how accept rates works, please don’t be put off by the relatively low percentage!
I always use
event.currentTarget.selectedItemwith the IndexChangeEvent. That should work in your case as well.