Agradezco los comentarios.
Código:
cbmy= 130; xlbl= 110; xcomp= 230; xhrs = 350; xkwh = 470; xcmb= 590; xcuo= 710; ximp= 830; for (i=1;i<=36;i++) { attachMovie("TextInput", "txtcom"+i, getNextHighestDepth(), {_x:xcomp, _y:cbmy}); this["txtcom"+i].text="0"; this["txtcom"+i].addEventListener("change", this); cbmy=cbmy+30; if ((i % 12 == 0) and (i>0)) { cbmy=cbmy+80; } } cbmy= 130; for (i=1;i<=36;i++) { attachMovie("TextInput", "txthrs"+i, getNextHighestDepth(), {_x:xhrs, _y:cbmy}); this["txthrs"+i].text="0"; this["txthrs"+i].addEventListener("change", this); cbmy=cbmy+30; if ((i % 12 == 0) and (i>0)) { cbmy=cbmy+80; } } this.change = function(mtxt:Object) { z = "texto"; val_txt1 = mtxt.target; } cbmy= 130; for (i=1;i<=36;i++) { attachMovie("ComboBox", "cmb"+i, i, {_x:xcmb, _y:cbmy}); this["cmb"+i].addItem({data:"00", label:"Opcion"}); this["cmb"+i].addItem({data:"12a", label:"Dic Anterior"}); this["cmb"+i].addItem({data:"01", label:"Enero"}); this["cmb"+i].addItem({data:"02", label:"Febrero"}); this["cmb"+i].addItem({data:"03", label:"Marzo"}); this["cmb"+i].addItem({data:"04", label:"Abril"}); this["cmb"+i].addItem({data:"05", label:"Mayo"}); this["cmb"+i].addItem({data:"06", label:"Junio"}); this["cmb"+i].addItem({data:"07", label:"Julio"}); this["cmb"+i].addItem({data:"08", label:"Agosto"}); this["cmb"+i].addItem({data:"09", label:"Septiembre"}); this["cmb"+i].addItem({data:"10", label:"Octubre"}); this["cmb"+i].addItem({data:"11", label:"Noviembre"}); this["cmb"+i].addItem({data:"12", label:"Diciembre"}); this["cmb"+i].addEventListener("change", this); attachMovie("TextInput", "txt_cuo"+i, getNextHighestDepth(), {_x:xcuo, _y:cbmy}); cbmy=cbmy+30; if ((i % 12 == 0) and (i>0)) { cbmy=cbmy+80; } } this.change = function(mcombo:Object) { h2 = mcombo.target; n_cbx=substring(h2,12,length(h2)); this["txt_cuo"+n_cbx].text=eval(h2).selectedItem.data; }