Comunidad de diseño web y desarrollo en internet online

MovieClip aleatorio

Citar            
MensajeEscrito el 22 Nov 2004 07:06 pm
Llevo poco tiempo trabajando en flash y necesito saber como mover un movieclip aleatoriamente por la pantalla.

S@LU2

Por Proximuz

1 de clabLevel



 

unknown
Citar            
MensajeEscrito el 22 Nov 2004 08:04 pm
hola, si te refieres a moverver cada determinado tiempo un movieclip por la pantalla yo lo ago de esta forma;
pon este codigo en el primero fotograma de tu movieClip, se movera cada 3 segundos :) :

Código :

function mov(){
   X=Math.random()*100;
   Y=Math.random()*100;
}
setInterval(mov,3000);
onEnterFrame=function(){
   _x+=(X-_x)/6;
   _y+=(Y-_y)/6;
}


espero ke te sirva ^^

Por Wanaya

Claber

1115 de clabLevel

4 tutoriales

 

La Unión Sovietica U_U

unknown
Citar            
MensajeEscrito el 23 Nov 2004 02:04 pm
gracias wanaya me sirvio de mucho

Por Proximuz

1 de clabLevel



 

unknown

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.