este es el codigo del primer frame
Código ActionScript :
function Mover(x,y, aceleracion) { _root.show.foto.onEnterFrame = function() { this._x += (x-this._x)/aceleracion; this._y += (y-this._y)/aceleracion; if (Math.abs(x-this._x)<0.5 && Math.abs(y-this._y)<0.5 ) { this._x = x; this._y = y; delete this.onEnterFrame; } }; }
este va a en el movie clip completo
Código ActionScript :
onClipEvent (mouseMove){ if (this.hitTest(_root._xmouse, _root._ymouse, true)){ _root.mover( -((foto._width-btn._width) /btn._width) * _xmouse,-((foto._height -btn._height) /btn._height) * _ymouse,7); } }
y este ultimo en el movie clip foto
Código ActionScript :
onClipEvent (load){ this._x=-(this._width/2)+(_parent.btn._width/2); this._y=-(this._height/2)+(_parent.btn._height/2); }