Something like this
onClipEvent (load) {
left = false;
}
onClipEvent (enterFrame) {
if (left == false) {
this._x += 5;
}
if (left == true) {
this._x -= 5;
}
if (this._x<=0) {
left = false;
}
if (this._x>=550) {
left = true;
}
}
You can change around when it += or -=, and the _x and _y values, I did it to test it.
It's basically what Vengeance said, but unless your _x coordinates end in .7 and can be hit exactly, it won't work.
That's the reason I put in >= and <=, they see if something is greater than or equal to, or less than or equal to the number after.
Questions?