# Game play area, help required

**URL:** <https://forum.kirupa.com/t/game-play-area-help-required/225617>\
**Category:** flash\
**Created:** [May 14, 2007, 9:19am UTC](https://forum.kirupa.com/t/game-play-area-help-required/225617 "2007-05-14T09:19:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![AllyCAT](https://avatars.discourse-cdn.com/v4/letter/a/f05b48/32.png) [@AllyCAT](https://forum.kirupa.com/u/AllyCAT)\
**Post date:** [May 14, 2007, 9:19am UTC](https://forum.kirupa.com/t/game-play-area-help-required/225617/1 "2007-05-14T09:19:46Z")

</div>

I am trying to define the play area of my game and I have detailed the code as follows but it doesn’t want to work, my character keeps moving outwith the area when I test the game, can anyone help a novice?

stop();  
Mouse.hide();  
geisha.gotoAndStop(1);  
geisha.move = {x:0, y:0};  
geisha.speed = 5;  
rightWall = 550;  
leftWall = 0;  
topWall = 0;  
bottomWall = 400;  
geishaHeight = 119.4;  
geishaWidth = 44.5;  
geisha.onEnterFrame = function(){  
this.move.x = Key.isDown(Key.RIGHT) - Key.isDown(Key.LEFT);  
this.move.y = Key.isDown(Key.DOWN) - Key.isDown(Key.UP);  
if (this.move.x || this.move.y){  
this.\_x += this.move.x \* this.speed;  
this.\_y += this.move.y \* this.speed;

}  
}
