Foros del Web » Creando para Internet » Flash y Actionscript »

TextInput y comboBox dinamicos

Estas en el tema de TextInput y comboBox dinamicos en el foro de Flash y Actionscript en Foros del Web. Hola buenas tardes, estoy generando unos textInput y combos dinamicamente, y quiero que al cambiar el contenido en los texinput a1 y b1, obtener dichos ...
  #1 (permalink)  
Antiguo 03/07/2009, 13:50
 
Fecha de Ingreso: julio-2009
Mensajes: 2
Antigüedad: 14 años, 9 meses
Puntos: 0
TextInput y comboBox dinamicos

Hola buenas tardes, estoy generando unos textInput y combos dinamicamente, y quiero que al cambiar el contenido en los texinput a1 y b1, obtener dichos valores para poder realizar una suma con estos valores, y que al cambiar la opcion del combo esta la coloque en un textinput c1 x asi decirlo el problema que tengo es que solo que funciona el change del combo y de los textinput no me funciona.
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;
}
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 19:34.