non ho il 2004 ma MX però penso che scrivi questo che ti posto dovrebbe andare
crea solo una palla (clip) la cui istanza è "palla"
codice:
inity = palla._y;
targety = inity;
initx = palla._x;
targetx = initx;
elfactor = 0.75;
speedfactor = 6;
dragging = false;
_root.createEmptyMovieClip("linea1", -100);
palla.swapDepths(1000);
this.onEnterFrame=function() {
linea1.clear();
linea1.lineStyle(1, 0x009900, 100);
linea1.moveTo(targetx, targety);
linea1.lineTo(palla._x, palla._y);
if (dragging) {
palla._x = _root._xmouse;
palla._y = _root._ymouse;
} else {
diffx = targetx - palla._x;
diffy = targety - palla._y;
oldx = palla._x;
oldy = palla._y;
palla._x += diffx / speedfactor + speedx * elfactor;
palla._y += diffy / speedfactor + speedy * elfactor;
speedx = palla._x - oldx;
speedy = palla._y - oldy;
}
}
palla.onPress=function(){
dragging = true;
}
palla.onRelease=palla.onReleaseOutside=function(){
dragging = false;
}