Comunidad de diseño web y desarrollo en internet online

Figuras alternas

Citar            
MensajeEscrito el 22 Mar 2005 07:38 pm
Hola a todos...

En la pelicula que estoy creando tengo cinco objetos quietos, y me gustaria encontrar un AScript que cuando yo toque uno de ellos este se aleje del mouse y si no lo toco vuelva a su posicion inicial.

Saludos de nuevo y gracias.

Por vcomics

217 de clabLevel



 

Medellin - Colombia

msie
Citar            
MensajeEscrito el 23 Mar 2005 02:56 pm
Podrias usar las ecuaciones de Robert Penner.

Código :

targetClip = bola_mc;
tipoMov = mx.transitions.easing.Back.easeOut;
propiedad = "_x";
veloc = 2;

bola_mc.onRollOver = function(){
   mover(25, 200);
   comprobarMetaInt = setInterval(comprobarMeta, 50, 200);
}

function comprobarMeta(xFin){
   if (targetClip._x == xFin){
      mover(200, 25);
      clearInterval(comprobarMetaInt);
   }
}

function mover(xIni, xFin){
   new mx.transitions.Tween(targetClip, propiedad, tipoMov, xIni, xFin, veloc, true);
}


La variable "targetClip" contiene el nombre del clip objetivo. Mírate la sección tutoriales, hay uno sobre ecuaciones de movimiento y trata sobre esto que te he puesto, leetelo que te ayudara bastante a entenderlo.

Deu!! ^^

Por Elecash

Claber

8126 de clabLevel

37 tutoriales
19 articulos
13 ejemplos

  Bastard Operators From Hell Desarrollador de GAIA Premio_Secretos Héroes

BarnaCity

firefox

 

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