Ver Mensaje Individual
  #6 (permalink)  
Antiguo 17/05/2005, 07:13
Bluesman74cl
 
Fecha de Ingreso: marzo-2003
Ubicación: onde toy?
Mensajes: 1.437
Antigüedad: 21 años, 1 mes
Puntos: 9
Wumanex ayer en la tarde encontré un código por ahi.. lo pegas en el primer frame y listo.. luego hay que incarle el diente pa' saber como trabaja y poder cambiar el tamaño del cuadrado.

Código:
direccion=new Array( 
   new Array (1,0), 
   new Array (0,1), 
   new Array (-1,0), 
   new Array (0,-1) 
); 
createEmptyMovieClip("cuadrito", 2); 
cuadrito.lineStyle(1, 0x000000, 100); 

cuadrito._x=10  //Movemos el "cuadradito" donde queramos 
cuadrito._y=10 
cuadrito.moveTo(0,0)  //situamos el "puntero" de dibujo en 0 

cuadrito.onEnterFrame=function(){ 
    if (paso<12){ 
         i=int(paso/3) 
         this.x+=(direccion[i][0]*10) 
         this.y+=(direccion[i][1]*10) 
         this.lineTo(this.x,this.y) 
         this.moveTo(this.x,this.y) 
         paso++ 
    }else { 
         this.beginFill( 0xeeeeee ); // Pa ponerle color 
         this.x=0 
         this.y=0 
         this.moveTo(this.x, this.y); 
         for (i=0;i<4;i++){ 
                  this.x+=(direccion[i][0]*30) 
                  this.y+=(direccion[i][1]*30) 
     this.lineTo(this.x, this.y); 
         } 
         this.endFill(); 
         this.onEnterFrame=null 
    } 
}
__________________
Buena Vida...
Francisco