fai questa prova
apri un fla nuovo, e schiaffaci dentro due immagini, convertile in clip ed istanziale img1, img2
poi sul keyframe che contiene le ue immagini incolla questo codice
Codice PHP:
var physics0:Number = 0.25;
var physics1:Number = 0.5;
var xspeed:Number = 0;
var yspeed:Number = 0;
// img1 comanda il movimento di img2
img1.onMouseMove=function(){
var xspeed:Number = ((_root._xmouse-this._x)*physics0)+(xspeed*physics1);
var yspeed:Number = ((_root._ymouse-this._y)*physics0)+(xspeed*physics1);
this._x += xspeed;
this._y += yspeed;
}
img2.onMouseMove=function(){
this._x = img1._x - img1._width;
this._y = img1._x - img1._height;
}
// potrebbe sembrare un errore ma non lo è. L'ho scritto solo per dare un po di movimento.
// se vuoi un movimento identico
// this._y = img1._y - img1._height;