Un buen efecto
En el primer frame en blanco pega este codigo:
Código :
inix = 150;
iniy = 100;
incrx = 20;
incry = 0;
distancia_accion = 35;
MovieClip.prototype.atrae = function (dist)
{
this.pos_x = this._x;
this.pos_y = this._y;
this.onEnterFrame = function ()
{
if (Math.abs (_root._xmouse - this._x) < dist and Math.abs (_root._ymouse - this._y) < dist)
{
this._x = this._x - (this._x - _root._xmouse) / 10;
//
this._y = this._y - (this._y - _root._ymouse) / 10;
}
else
{
this._x = this._x - (this._x - this.pos_x) / 10;
this._y = this._y - (this._y - this.pos_y) / 10;
Math.abs (this._x - this.pos_x) < .5 ? this._x = this.pos_x : null;
Math.abs (this._y - this.pos_y) < .5 ? this._y = this.pos_y : null;
}
};
};
for (i = 0; i < 64; i++)
{
attachMovie ("sq", "sq" + i, i);
var it = _root["sq" + i];
it._x = inix + incrx;
it._y = iniy + incry;
incrx += 20;
if (incrx > 160)
{
incrx = 20;
incry += 20;
}
it.atrae (distancia_accion);
}
Haz un cuadro gris hazlo movie clip con la estancia de "sq" (sin comillas) y eliminalo, esto con el fin que el codigo sirva y se quede en la libreria.
Pica control+L y te aparecera en la libreria haz click con el con el boton derecho y picale en vinculacion, haz click en la casilla exportar para accion script y exportar en el primer fotograma, haz click en aceptar.
Pica CONTROL+ENTER y pasa el mouse por los cuadros y veras lo que pasa...
Saludos

