# Object not moving even when there's no errors

**URL:** https://forum.kirupa.com/t/object-not-moving-even-when-theres-no-errors/331507
**Category:** flash
**Created:** [August 14, 2013, 2:45pm UTC](https://forum.kirupa.com/t/object-not-moving-even-when-theres-no-errors/331507 "2013-08-14T14:45:41Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Mark1989](https://avatars.discourse-cdn.com/v4/letter/m/41988e/32.png) [@Mark1989](https://forum.kirupa.com/u/Mark1989)
#### Post date: [August 14, 2013, 2:45pm UTC](https://forum.kirupa.com/t/object-not-moving-even-when-theres-no-errors/331507/1 "2013-08-14T14:45:41Z")

</div>

Hi guys, I’ve been working on my class for a while now and everything is running without errors however my PlayerPic doesn’t actually move when the arrow keys are pressed which it’s meant to. Can some please help me.

```auto

package {
	
	import flash.display.MovieClip;
	import flash.events.Event;
	import flash.events.MouseEvent;
	import flash.events.KeyboardEvent;
	import flash.ui.Keyboard;
	
	public class PlayerPic extends MovieClip {
		public function PlayerPic()
		
			{
			// constructor code			
			trace ("PlayerPic Constructer")
			}
			
	function arrowMove(event:KeyboardEvent):void
			{
			if (event.keyCode == Keyboard.LEFT)
				{
				this.x -= 5;
			if (this.x < 0)
				{
				this.x = 0;
				}
				}
			if (event.keyCode == Keyboard.RIGHT)
				{
			this.x += 5;
			if (this.x > 250)
				{
			this.x = 250;
				}
				}
		if (event.keyCode == Keyboard.UP)
		{
			this.y -= 5;
			if (this.y < 0)
				{
			this.y = 0;
				}
		}
		if (event.keyCode == Keyboard.DOWN)
		{
			this.y += 5;
		if (this.y > 550)
			{
           this.y = 550;
			}
		}
	  }	
   }
}

```
