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
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
onClipEvent(enterFrame){
if(this.hitTest(_root.char)){
_root.char.swapDepths(this)
}
}
the problem is that I flicker
can someone help me?