Las Tablas
Este codigo es casi igual, solo cambia el codigo del boton.
En el proyecto ponemos 30 textos dinamicos, 2 introduccion de texto y un boton.
En variables les ponemos a los 2 introduccion de texto el nombre mul a mulx.
En las misma ponemos nombre de instancia Solotexto1_txt y Solotexto2_txt a los introduccion de texto.
Luego ponemos en otras 10 variables de texto dinamico del 1 al 10 el nombre num1 a num10.
Luego ponemos en otras 10 variables de texto dinamico del 11 al 20 el nombre por11 a por20.
Luego ponemos en otras 10 variables de texto dinamico del 21 al 30 el nombre res11 a res20.
Vamos al fotograma y en acciones escribimos:
Solotexto2_txt.restrict = "0-9.";
Solotexto1_txt.restrict = "0-9.";
Luego en el boton escribimos en acciones:
Para Sumar
on (release) {
_root.Num1 = (Number(Mul));
_root.Num2 = (Number(Mul));
_root.Num3 = (Number(Mul));
_root.Num4 = (Number(Mul));
_root.Num5 = (Number(Mul));
_root.Num6 = (Number(Mul));
_root.Num7 = (Number(Mul));
_root.Num8 = (Number(Mul));
_root.Num9 = (Number(Mul));
_root.Num10 = (Number(Mul));
_root.Por1 = (Number(Mulx));
_root.Por2 = (Number(Mulx)*2);
_root.Por3 = (Number(Mulx)*3);
_root.Por4 = (Number(Mulx)*4);
_root.Por5 = (Number(Mulx)*5);
_root.Por6 = (Number(Mulx)*6);
_root.Por7 = (Number(Mulx)*7);
_root.Por8 = (Number(Mulx)*8);
_root.Por9 = (Number(Mulx)*9);
_root.Por10 = (Number(Mulx)*10);
_root.Res1 = (Number(Por1)+ Number(Num1));
_root.Res2 = (Number(Por2)+ Number(Num2));
_root.Res3 = (Number(Por3)+ Number(Num3));
_root.Res4 = (Number(Por4)+ Number(Num4));
_root.Res5 = (Number(Por5)+ Number(Num5));
_root.Res6 = (Number(Por6)+ Number(Num6));
_root.Res7 = (Number(Por7)+ Number(Num7));
_root.Res8 = (Number(Por8)+ Number(Num8));
_root.Res9 = (Number(Por9)+ Number(Num9));
_root.Res10 = (Number(Por10)+ Number(Num10));
}
Ir al ejemplo Tabla de Sumar.swf (281,8 kB)
Para Restar
on (release) {
_root.Num1 = (Number(Mul));
_root.Num2 = (Number(Mul));
_root.Num3 = (Number(Mul));
_root.Num4 = (Number(Mul));
_root.Num5 = (Number(Mul));
_root.Num6 = (Number(Mul));
_root.Num7 = (Number(Mul));
_root.Num8 = (Number(Mul));
_root.Num9 = (Number(Mul));
_root.Num10 = (Number(Mul));
_root.Por1 = (Number(Mulx));
_root.Por2 = (Number(Mulx)*2);
_root.Por3 = (Number(Mulx)*3);
_root.Por4 = (Number(Mulx)*4);
_root.Por5 = (Number(Mulx)*5);
_root.Por6 = (Number(Mulx)*6);
_root.Por7 = (Number(Mulx)*7);
_root.Por8 = (Number(Mulx)*8);
_root.Por9 = (Number(Mulx)*9);
_root.Por10 = (Number(Mulx)*10);
_root.Res1 = (Number(Por1)+ Number(Num1));
_root.Res2 = (Number(Por2)+ Number(Num2));
_root.Res3 = (Number(Por3)+ Number(Num3));
_root.Res4 = (Number(Por4)+ Number(Num4));
_root.Res5 = (Number(Por5)+ Number(Num5));
_root.Res6 = (Number(Por6)+ Number(Num6));
_root.Res7 = (Number(Por7)+ Number(Num7));
_root.Res8 = (Number(Por8)+ Number(Num8));
_root.Res9 = (Number(Por9)+ Number(Num9));
_root.Res10 = (Number(Por10)+ Number(Num10));
}
Ir al ejemplo Tabla de Restar.swf (281,4 kB)
Para Multiplicar
on (release) {
_root.Num1 = (Number(Mul));
_root.Num2 = (Number(Mul));
_root.Num3 = (Number(Mul));
_root.Num4 = (Number(Mul));
_root.Num5 = (Number(Mul));
_root.Num6 = (Number(Mul));
_root.Num7 = (Number(Mul));
_root.Num8 = (Number(Mul));
_root.Num9 = (Number(Mul));
_root.Num10 = (Number(Mul));
_root.Por1 = (Number(Mulx));
_root.Por2 = (Number(Mulx)*2);
_root.Por3 = (Number(Mulx)*3);
_root.Por4 = (Number(Mulx)*4);
_root.Por5 = (Number(Mulx)*5);
_root.Por6 = (Number(Mulx)*6);
_root.Por7 = (Number(Mulx)*7);
_root.Por8 = (Number(Mulx)*8);
_root.Por9 = (Number(Mulx)*9);
_root.Por10 = (Number(Mulx)*10);
_root.Res1 = (Number(Por1)* Number(Num1));
_root.Res2 = (Number(Por2)* Number(Num2));
_root.Res3 = (Number(Por3)* Number(Num3));
_root.Res4 = (Number(Por4)* Number(Num4));
_root.Res5 = (Number(Por5)* Number(Num5));
_root.Res6 = (Number(Por6)* Number(Num6));
_root.Res7 = (Number(Por7)* Number(Num7));
_root.Res8 = (Number(Por8)* Number(Num8));
_root.Res9 = (Number(Por9)* Number(Num9));
_root.Res10 = (Number(Por10)* Number(Num10));
}
Ir al ejemplo Tabla de Multiplicar.swf (281,8 kB)
Para Dividir
on (release) {
_root.Num1 = (Number(Mul));
_root.Num2 = (Number(Mul));
_root.Num3 = (Number(Mul));
_root.Num4 = (Number(Mul));
_root.Num5 = (Number(Mul));
_root.Num6 = (Number(Mul));
_root.Num7 = (Number(Mul));
_root.Num8 = (Number(Mul));
_root.Num9 = (Number(Mul));
_root.Num10 = (Number(Mul));
_root.Por1 = (Number(Mulx));
_root.Por2 = (Number(Mulx)*2);
_root.Por3 = (Number(Mulx)*3);
_root.Por4 = (Number(Mulx)*4);
_root.Por5 = (Number(Mulx)*5);
_root.Por6 = (Number(Mulx)*6);
_root.Por7 = (Number(Mulx)*7);
_root.Por8 = (Number(Mulx)*8);
_root.Por9 = (Number(Mulx)*9);
_root.Por10 = (Number(Mulx)*10);
_root.Res1 = (Number(Por1)* Number(Num1));
_root.Res2 = (Number(Por2)* Number(Num2));
_root.Res3 = (Number(Por3)* Number(Num3));
_root.Res4 = (Number(Por4)* Number(Num4));
_root.Res5 = (Number(Por5)* Number(Num5));
_root.Res6 = (Number(Por6)* Number(Num6));
_root.Res7 = (Number(Por7)* Number(Num7));
_root.Res8 = (Number(Por8)* Number(Num8));
_root.Res9 = (Number(Por9)* Number(Num9));
_root.Res10 = (Number(Por10)* Number(Num10));
}
Ir al ejemplo Tabla de Dividir.swf (281,6 kB)