action escript
TRANSCRIPT
![Page 1: Action escript](https://reader035.vdocuments.pub/reader035/viewer/2022081422/557b8417d8b42a62418b469d/html5/thumbnails/1.jpg)
Programando en flash. (Action script)Chat ar
charAt es coger cada elemento qu esta en una cadenai++;
var nombre="andres ";
var i=0;
while(i<nombre.length){
trace(nombre.charAt(i));//
i++;
}
![Page 2: Action escript](https://reader035.vdocuments.pub/reader035/viewer/2022081422/557b8417d8b42a62418b469d/html5/thumbnails/2.jpg)
var i=0;while(i<=10){trace("este es el} número "+i);i++;}
var i=0;
while(i<=100){
trace("estees el} número "+i);
i++;
}
![Page 3: Action escript](https://reader035.vdocuments.pub/reader035/viewer/2022081422/557b8417d8b42a62418b469d/html5/thumbnails/3.jpg)
var i=5;
while(i<=5){
trace("este es el} número "+i);
i++;
}
![Page 4: Action escript](https://reader035.vdocuments.pub/reader035/viewer/2022081422/557b8417d8b42a62418b469d/html5/thumbnails/4.jpg)
Declaraciones
var i=0;do{
trace("este es el numero ",i);
}while(i++<=10);
for(var i=0;i<=10;i++){
trace("el siguiente es el numero "+i);
}
![Page 5: Action escript](https://reader035.vdocuments.pub/reader035/viewer/2022081422/557b8417d8b42a62418b469d/html5/thumbnails/5.jpg)
var i=1;
var j=10;
while(i<=10){
trace("subiendo "+i);
trace("bajando "+j);
i++;
j--;
}
![Page 6: Action escript](https://reader035.vdocuments.pub/reader035/viewer/2022081422/557b8417d8b42a62418b469d/html5/thumbnails/6.jpg)
Loop for-inEJERCICIOS DE PROGRAMACIÓN EN NUMEROS
![Page 7: Action escript](https://reader035.vdocuments.pub/reader035/viewer/2022081422/557b8417d8b42a62418b469d/html5/thumbnails/7.jpg)
En el siguiente ejercicio sacare los números pares con un código de actión script.
Var i=2;
While(i<=100){
trace(i<este es el numero”+i);
i=i+2;
}
Do-While: nos asegura que el cuerpo del loop se ejecuta al menos una vez, se evalúa al ejecutar la
![Page 8: Action escript](https://reader035.vdocuments.pub/reader035/viewer/2022081422/557b8417d8b42a62418b469d/html5/thumbnails/8.jpg)
escritura del programa este primero ejecuta y luego evalúa.
var bola=new Object();bola.radius=12;bola.color="red";bola.style="beach";for(var prop in bola){trace("böla."+prop+ " es "+bola[prop]);}
![Page 9: Action escript](https://reader035.vdocuments.pub/reader035/viewer/2022081422/557b8417d8b42a62418b469d/html5/thumbnails/9.jpg)
var myArr=[123,345,456,789];
for(var elem in myArr){
trace(myArr[elem]);
}
![Page 10: Action escript](https://reader035.vdocuments.pub/reader035/viewer/2022081422/557b8417d8b42a62418b469d/html5/thumbnails/10.jpg)
Empleando números primos en el programa de actión script
realizar un programa empleando cualquier loop que escriba los numeros primos
var myArr=[2,3,5,7,11,13,17];
for(var elem in myArr){
trace(myArr[elem]);
}
Ejerció de programación este consiste en Sacar las mujeres de los hombresvar hombres=["jesus","daniela","luis","carmen","oscar","maria","john","paola"]
var i=1;
while(i<hombres.length){
![Page 11: Action escript](https://reader035.vdocuments.pub/reader035/viewer/2022081422/557b8417d8b42a62418b469d/html5/thumbnails/11.jpg)
trace("El Nombre de la mujer "+i+""+""+" es: "+hombres[i]);
i=i+2;
}
Ejercicio de los Números primos con actión script
![Page 12: Action escript](https://reader035.vdocuments.pub/reader035/viewer/2022081422/557b8417d8b42a62418b469d/html5/thumbnails/12.jpg)