# Movement

**URL:** <https://forum.kirupa.com/t/movement/97349>\
**Category:** Uncategorized\
**Created:** [December 21, 2003, 2:37am UTC](https://forum.kirupa.com/t/movement/97349 "2003-12-21T02:37:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Comglomo](https://avatars.discourse-cdn.com/v4/letter/c/e19adc/32.png) [@Comglomo](https://forum.kirupa.com/u/Comglomo)\
**Post date:** [December 21, 2003, 2:37am UTC](https://forum.kirupa.com/t/movement/97349/1 "2003-12-21T02:37:53Z")

</div>

Ok… I have a simple code for movement…

```auto

on (keyPress "<Left>") {
	currentX = this._x;
	this._x = currentX - 2;
	_root.hansl_front._rotation = 270;
}
on (keyPress "<Right>") {
	currentX = this._x;
	this._x = currentX + 2;
	_root.hansl_front._rotation = 90;
}
on (keyPress "<Up>") {
	currentY = this._y;
	this._y = currentY - 2;
	_root.hansl_front._rotation = 360;
}
on (keyPress "<Down>") {
	currentY = this._y;
	this._y = currentY + 2;
	_root.hansl_front._rotation = 180;
}

```

I want it so that whenever you hit like the up button… it changes the movieclip to a differnt image so it looks like the character is actually walking forward backwards and ect…  
thanks for your help
