Simple movement script

hey all, I’m new to action script and to the forums here and would appreciate some help,

I am trying to get a MC to move left along the X axis then stop before it goes off screen,
I looked at a tutorial here and was able to get it to move but i am not sure as to how to get it to stop, some sort of if x=15 then stop sorta thing


onClipEvent(enterFrame) {
    speed = -5;
    this._x += speed;
}