Originariamente inviato da felixyorke
ok..grazie, ma volendo è possibile creare un effetto elastico al ritorno in posizione? e se si come?
cosa dovrei aggiugere ale codice?
potresti usare le twenn cosi comode....

ti basta fare una piccola ricerca su queste ....

cmq dai una cosa del genere
sul frame aggiungi una proto x lo spostamento

stop();
posInx=uomo._x
posIny=uomo._y
MovieClip.prototype.moveThis = function (newX, newY) {
var tx = new mx.transitions.Tween(this, "_x", mx.transitions.easing.Elastic.easeOut, this._x, newX, 1, true);
var ty = new mx.transitions.Tween(this, "_y", mx.transitions.easing.Elastic.easeOut, this._y, newY, 1, true);
}

poi sull'area sensibile

on (press) {
_root.uomo.startDrag();
}
on (release, releaseOutside) {
if (_root.uomo.hitTest(_root.cerchio)) {
//uomo._visible=false
trace("t")
_root.cerchio.gotoAndStop(2);
}else{
_root.uomo._visible=true
_root.uomo.moveThis(_root.posInx,_root.posIny);

}
_root.uomo.stopDrag();
}