Move left and stop?

This is probably an obvious answer but… I currently have this code:

onClipEvent(enterFrame) {

this._x-=10;

if (this._x > 35){
this._x=stop();
}
}

The movie clip currently moves to the left as it should but I want it to stop when it gets to 35 on the x coordinates. Is there an easier way to do this?

There’s no easier way…but there’s definitely a more correct way as assigning stop() to the _x property won’t work:

onClipEvent (enterFrame) {
	if (this._x > 35) {
		this._x -= 10;
	}
}

Fantastic! This was driving me nuts. Works perfect. Thank you!