Posted By

limonn on 08/21/06


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

damarev


moviendo un objeto con codigo de un solo lugar


 / Published in: ActionScript
 

URL: http://www.after-hours.org/foro/viewtopic.php?p=42044#42044

setInterval

  1. var intervalo:Number;
  2. var cuenta:Number = 0;
  3. function muevoClip(vel, pos){
  4. clip._x += vel;
  5. if(clip._x >= pos)clearInterval(intervalo);
  6. updateAfterEvent()
  7. }
  8. clip.onRelease = function(){
  9. // (funcion, duracion, velocidad, posicion final)
  10. intervalo = setInterval(muevoClip, 20, 1, 150)
  11. }

Report this snippet  

You need to login to post a comment.