As far I remember setChangeHandler() was used in v1 component library for Flash 6. Are you surely using v1 components? I don't think so, since there was no createClassChildAtDepth(), mx.controls.ComboBox class, etc. In v2 components there is an other way of attaching event handlers (addEventListener, "change" event).
Attila =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= From: Carl Welch <[EMAIL PROTECTED]> To: Flashcoders mailing list <[email protected]> Date: Tuesday, June 26, 2007, 11:46:14 AM Subject: [Flashcoders] Attaching a change handler to a dynamically generated comboBox --====----====----====----====----====----====----====----====----====----===-- Hello List, I am having an issue with attaching a "change" handler to a ComboBox that is being dynamically generated. What is wrong with this code I am using? var myComboBox = myScrollBox.createClassChildAtDepth(mx.controls.ComboBox, DepthManager.kTop, {_x:10, _y:10}); myComboBox.addItem({label:"Foo", data:"FooBar"}); function comboDisplay(component) { trace(myComboBox.getSelectedItem().data); } myComboBox.setChangeHandler("comboDisplay"); As a test, I tried: myComboBox.onPress = function() { trace(myComboBox.getSelectedItem().data); } ... and it did trace the first item, but of course it wouldn't work as a dropdown anymore. Thanks. -- Carl Welch http://www.carlwelch.com [EMAIL PROTECTED] 805.403.4819 _______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= _______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com

