I'm not sure if move() updated the x and y continually or only when it reaches the end, but you could do like:
PHP Code:
function whatever() {
this.move(5, 2, 10, 0); // delta x, delta y, time, options
}
If you wanted to call a function when it reached an x of 7, you would just schedule the event for when the x would be 7
Set it up like an equation
PHP Code:
x = 5 + (5/10)(t)
7 = 5 + (5/10)(t)
2 = (5/10)(t)
4 = t
then in your function
PHP Code:
function whatever() {
this.move(5, 2, 10, 0); // delta x, delta y, time, options
this.scheduleEvent(4, "onMyFunction");
}
(not trying to sound condescending, sorry if it comes off that way)