# HOw to Pause A Game in Action Script 3.0?

**URL:** https://forum.kirupa.com/t/how-to-pause-a-game-in-action-script-3-0/326936
**Category:** Uncategorized
**Created:** [January 24, 2012, 4:04am UTC](https://forum.kirupa.com/t/how-to-pause-a-game-in-action-script-3-0/326936 "2012-01-24T04:04:18Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![raphaelle](https://avatars.discourse-cdn.com/v4/letter/r/7bcc69/32.png) [@raphaelle](https://forum.kirupa.com/u/raphaelle)
#### Post date: [January 24, 2012, 4:04am UTC](https://forum.kirupa.com/t/how-to-pause-a-game-in-action-script-3-0/326936/1 "2012-01-24T04:04:18Z")

</div>

hi,

i would like to know on how to pause a game in as3, i did b4 to put the stage frame rate to zero(0)

and it actually working. but what i wanted to have is a drop down menu. when the esc button (27 in ASCII code) was pressed a drop down menu will pop down and the game paused.

i did this code but not working :

if(e.keyCode == 27)  
{  
menuDown.play();

```
 if(stage.frameRate == 24)

```

{  
stage.frameRate = 0;  
}

```
 if(stage.frameRate != 24)

```

{  
stage.frameRate = 24;  
}

}

it pauses but the driop down menu wont come down bcoz the frame rate is zero,

hope somebody can help me here.

thanks in advance…

cheers,  
raphaelle
