Elasticity and x/y

This…

Movieclip.prototype.elasticMove = function(target, accel, convert) {
step = step * accel + (target - this._x) * convert;
this._x += step;
}

is the code in the actions layer

This

onClipEvent (enterFrame) {

elasticMove(_root.newX, 0.7, 0.3)

}

onClipEvent(load){
_root.newX= 303;
}

is the code on the mvie clip to relocate it on the x axis. A button would specify a new x position with this code
on(release){
_root.newX=960;
}

So I’m wondering how I can make it so this code also moves the movie clip on the y axis so i can have a diagonal move.
Any takers?

http://downloads.junioronline.us/details.php?section=3&item=2

amazing thank you… I was trying tofigure out how to add another target in there:)

lol… it’s that simple :wink:

nice to see a Canadian who hates hockey :beam: