Tema: Ayuda
Ver Mensaje Individual
  #2 (permalink)  
Antiguo 07/01/2005, 22:56
Avatar de Bandit
Bandit
Moderador
 
Fecha de Ingreso: julio-2003
Ubicación: Lima - Perú
Mensajes: 16.726
Antigüedad: 20 años, 9 meses
Puntos: 406
Hola hiv_davis:
El cuadro colócalo dentro de Un MC.
Este MC lo pones en la capa 1 frame 1 del escenario y le pones como nombre de instancia: mi_mc
Crea otra capa y en el frame 1 coloca este código:
var acceleration = .4;
var friction = .6;
var scale = {smin:40, smax:100};
mi_mc.onEnterFrame = function() {
var hit = this.hitTest(this._parent._xmouse, this._parent._ymouse, true);
var scale = scale[hit ? "smax" : "smin"];
this.scale += (scale-this._xscale)*acceleration;
this.scale *= friction;
this._xscale += this.scale;
this._yscale += this.scale;
};
con esto vas conseguir hacer ese efecto con rebote si quieres que no tenga rebote en ésta línea: var friction = .6; el número 6 lo cambias por 4.

Espero haberte sido de ayuda.
__________________
Bandit.
Si no sabes estudia y si sabes enseña.
http://www.banditwebdesign.com/