I have this function that moves the cursor automatically to random points. I want to know how I can make them move to 4 specific points (x,y coordinates) instead.
I am assuming I need to create an array of the of some sort with the x,y points and tween them but have no idea how to go about this.
function autoMoveObject() {
if (!mouseControl) {
var moveObjectX:Tween = new Tween(cursor, "_x", Regular.easeOut, cursor._x, Math.random() * Stage.width, 1, true);
var moveObjectY:Tween = new Tween(cursor, "_y", Regular.easeOut, cursor._y, Math.random() * Stage.height, 1, true);
moveObjectX.onMotionFinished = function() {
autoMoveObject();
};
}
}