se deve muoversi secondo una giuda onestamente non so come si possa fare, se invece ti va bene che si muova in linea retta un po' di tempo fa avevo trovato da qualche parte (forse è opera di Yassassin ma non sono sicuro) questo:
codice:
// This prototype move a mc from its
// position to another point in the movie //
// PARAMETERS
// McIstanceName.goToPoint(x,y,[vel])
// x -> X destination coordinate
// y -> Y destination coordinate
// vel -> number of movementes from actual to final position
// (optional, default is 10)
// Higher is 'vel', slower is the movement of the mc
//
// **********************************************************//
MovieClip.prototype.goToPoint = function(x,y,vel){
var ini_x,ini_y,distX,distY,movX,movY
!vel ? vel=10 : null
ini_x = this._x
ini_y = this._y
distX = Math.round(x-ini_x)
distY = Math.round(y-ini_y)
movX = distX / vel
movY = distY / vel
this.onEnterFrame = function(){
this._y!= y ? this._y+=movY : null
this._x != x ? this._x+=movX : null
this._y == y && this._x == x ? this.onEnterFrame = null : null
}
}
________________________
usage:
________________________
// SOME EXAMPLES
// Create a movieclip with istance
//name 'Mc'
//mc.goToPoint(400,200)
//mc.goToPoint(400,200,40)
//mc.goToPoint(400,200,150)
vedi tu se può esserti utile..