Tema: Set Variable
Ver Mensaje Individual
  #7 (permalink)  
Antiguo 23/07/2004, 09:01
Avatar de TMeister
TMeister
Crazy Coder
 
Fecha de Ingreso: enero-2002
Ubicación: En la Oficina
Mensajes: 2.880
Antigüedad: 22 años, 2 meses
Puntos: 193
Coloca 3 campos de texto en tu escenario

campo1_txt -> Input Text
campo2_txt -> Input Text
res_txt -> Dinamic Text

y pega este codigo en el primer frame

Código:
campo1_txt.restrict = "0-9";
campo2_txt.restrict = "0-9";
campo1_txt.onChanged = campo2_txt.onChanged=function () {
	if (campo1_txt.length && campo2_txt.length) {
		a = Number(campo1_txt.text);
		b = Number(campo2_txt.text);
		res_txt.text = a+b;
	}
};
Y listo....

PD los EnterFrame no son la solucion a todo... Ademas hacen que la aplicacion o pelicula gaste recursos del CPU haciendola lenta.....


Saludos!!

Última edición por TMeister; 23/07/2004 a las 09:05