# Borders problem

**URL:** <https://forum.kirupa.com/t/borders-problem/229779>\
**Category:** Uncategorized\
**Created:** [June 20, 2007, 5:57am UTC](https://forum.kirupa.com/t/borders-problem/229779 "2007-06-20T05:57:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![silverneo188](https://avatars.discourse-cdn.com/v4/letter/s/bbe5ce/32.png) [@silverneo188](https://forum.kirupa.com/u/silverneo188)\
**Post date:** [June 20, 2007, 5:57am UTC](https://forum.kirupa.com/t/borders-problem/229779/1 "2007-06-20T05:57:21Z")

</div>

im making a semi-3D game and I have borders.

----Problem 1----  
When the char hits the border he stops, but then I cant move after that, here is my actionscript

```auto

onClipEvent(load){
 speed=3
}
onClipEvent(enterFrame){
           if(!_root.bord.hitTest(_x,_y,true)){
 if(Key.isDown(Key.UP)){
  this._y -= speed;
 }else if(Key.isDown(Key.DOWN)){
  this._y += speed;
 }
 if(Key.isDown(Key.LEFT)){
  this._x -= speed;
 }else if(Key.isDown(Key.RIGHT)){
  this._x += speed;
 }
           }
}

```

----Problem 2----  
Im trying to make it to where when you hit the tree you swap depths to become behind it, here is my as

```auto

onClipEvent(enterFrame){
	if(this.hitTest(_root.char)){
		_root.char.swapDepths(this)
	}
}

```

the problem is that I flicker

can someone help me?
