# Whats wrong? please help!

**URL:** <https://forum.kirupa.com/t/whats-wrong-please-help/160886>\
**Category:** Uncategorized\
**Created:** [August 30, 2005, 12:47pm UTC](https://forum.kirupa.com/t/whats-wrong-please-help/160886 "2005-08-30T12:47:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abbe](https://avatars.discourse-cdn.com/v4/letter/a/6f9a4e/32.png) [@Abbe](https://forum.kirupa.com/u/Abbe)\
**Post date:** [August 30, 2005, 12:47pm UTC](https://forum.kirupa.com/t/whats-wrong-please-help/160886/1 "2005-08-30T12:47:42Z")

</div>

Hi!

I need some help can some one tell my why this code don’t work:

```auto

onClipEvent (enterFrame) {
	if (Key.isDown(Key.DOWN)) {
		_y += 1;
	}
	if (Key.isDown(Key.UP)) {
		_y -= 1;
	}
	if (Key.isDown(Key.LEFT)) {
		_x -= 1;
	}
	if (Key.isDown(Key.RIGHT)) {
		_x += 1;
	}
	if (walls.hitTest(getBounds(_root).xMax, _y, true)) {
		_x -= 1;
	}
	if (walls.hitTest(getBounds(_root).xMin, _y, true)) {
		_x += 1;
	}
	if (walls.hitTest(_x, getBounds(_root).yMax, true)) {
		_y -= 1;
	}
	if (walls.hitTest(_x, getBounds(_root).yMin, true)) {
		_y += 1;
	}
}

```

I got one object caled walls and one caled ball(there is there I put the code).

Thanks  
Albert:cubs:
