我正在尝试将组合框组件用于 Flash。我无法触发更改事件。我的代码几乎直接来自 adobe 网站(链接如下)。该框已填充,但更改值不会产生跟踪输出。我究竟做错了什么?
myCombo.addItem("hi1", "hi5");
myCombo.addItem("h2", "hi6");
myCombo.addItem("hi3", "hi7");
myCombo.addItem("h4", "hi8");
var form = new Object();
form.change = function(eventObj){
trace("Value changed to " + eventObj.target.value);
}
myCombo.addEventListener("change", form);