Re: [Flashcoders] ComboBox not firing change event when selectedIndex set

2006-01-16 Thread Yehia Shouman
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

Re: [Flashcoders] ComboBox not firing change event when selectedIndex set

2006-01-15 Thread Chris Velevitch
This is the intended behaviour. You should fire the change event yourself. The reason being, know you changed it, so you can call or do anything else you like at the same time. It's only when the user interacts with a component that you want to detect. Chris -- Chris Velevitch Manager - Sydney Fl

[Flashcoders] ComboBox not firing change event when selectedIndex set

2006-01-15 Thread Steven Sacks
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