prova questo sul clip con la foto
codice:
onClipEvent (load) {
inity = _y;
targety = inity;
initx = _x;
targetx = initx;
elfactor = 0 // se vuoi l'effetto elastico prova con .75;
speedfactor = 6;
}
onClipEvent (enterFrame) {
diffx = targetx - _x;
diffy = targety - _y;
oldx = _x;
oldy = _y;
_x += diffx / speedfactor + speedx * elfactor;
_y += diffy / speedfactor + speedy * elfactor;
speedx = _x - oldx;
speedy = _y - oldy;
trace(_y)
if(this._y > (targetY-.50)){
// azione caricamento
trace("arrivato")
}
}
ed al bottone associa
codice:
on (release) {
sfondo.targetX=300
sfondo.targetY=300
}