use this instead (attach ur function to an object) var Listener_obj:Object= new Object(); Listener_obj.change=function(evt:Object) { trace("new Selected Index="+evt.target.selectedIndex); } myCmb.addEventListener("change",Listener_obj); myCmb.selectedIndex=2;
the reason behind this, is that you can attach more than an event listener to that Listener_obj and finally in 1 line of code use it with the combobox. Good luck Yehia Shouman On 1/16/06, Steven Sacks <[EMAIL PROTECTED]> wrote: > > function change() { > trace("change"); > } > MyCmb.addEventListener("change", this); > > MyCmb.selectedIndex = MyCmb.selectedIndex + 1; > > Does not fire a change event. How do I detect when the combo box has > changed from code not from direct user interaction with the > component? This > seems completely stupid to me because the combobox WAS CHANGED so it > SHOULD > FIRE A CHANGE EVENT. > > _______________________________________________ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders