# Simple If Statement movement

**URL:** <https://forum.kirupa.com/t/simple-if-statement-movement/249847>\
**Category:** flash\
**Created:** [January 23, 2008, 1:25am UTC](https://forum.kirupa.com/t/simple-if-statement-movement/249847 "2008-01-23T01:25:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![skyler](https://avatars.discourse-cdn.com/v4/letter/s/ecae2f/32.png) [@skyler](https://forum.kirupa.com/u/skyler)\
**Post date:** [January 23, 2008, 1:25am UTC](https://forum.kirupa.com/t/simple-if-statement-movement/249847/1 "2008-01-23T01:25:15Z")

</div>

So I have been on hiatus from coding flash for like a year or more. Trying to remember just simple stuff is hard.

What am I doing wrong here. This is linking to a movieClip.

```auto
onClipEvent(load){
	_root._x=200;
	this._x=0;
	this._y=200;
	speed=3;
}
onClipEvent(enterFrame){
	this._x-=speed;
	if(this._x>0){
		this._x+=speed;
	}

}

```
