发布网友 发布时间:2024-09-26 21:28
共1个回答
热心网友 时间:2024-11-14 04:52
on (release) {import mx.containers.Window;//导入Window类import mx.managers.PopUpManager;//导入PopUpManager类myWindow = new Object();myWindow = PopUpManager.createPopUp(_root, Window, true);myWindow.title = "基础信息---100万吨棒材项目";myWindow.contentPath = "100万吨棒材项目";myWindow.closeButton = true;myWindow.setSize(300, 400);myWindow._x = (this._x+this._width);myWindow._y = this._y;obj = new Object();obj.click = function() {myWindow.content.moment.text= "12";//设置瞬时量值myWindow.deletePopUp();};myWindow.addEventListener("click", obj);}就如同以上代码;要设施window组件中的一个文本框的值,那么就要通过监听事件click;只有这样,才可以设置文本(moment)的值;最后测试,问题得以解决;