Ok so i'm having trouble with something that should be fairly easy to fix but i dont know enough about actionscript to figure
out what i'm doing wrong.
Ok so lets say i have an object on stage and i want it to move left and right when it hits a certain point how should i go about it?
i tried this but it contradicts itself.
onClipEvent(load){
var speed = 1;
}
onClipEvent (enterFrame){
if (this._x <250){
this._x=-speed;
}else{
if (this._x >500){
this._x=+speed;
this obviously doesn't work because i'm telling the object to move in both directions between these values.
So what i want to do is have the object looping from left to right between two values. it should be a fairly straight forward fix
but i'm just not clever enough to figure it out.
Can anyone help?