# How to pause a game?how to make script in movieclip?

**URL:** <https://forum.kirupa.com/t/how-to-pause-a-game-how-to-make-script-in-movieclip/251776>\
**Category:** Uncategorized\
**Created:** [February 12, 2008, 3:59pm UTC](https://forum.kirupa.com/t/how-to-pause-a-game-how-to-make-script-in-movieclip/251776 "2008-02-12T15:59:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bluemagica](https://avatars.discourse-cdn.com/v4/letter/b/a4c791/32.png) [@bluemagica](https://forum.kirupa.com/u/bluemagica)\
**Post date:** [February 12, 2008, 3:59pm UTC](https://forum.kirupa.com/t/how-to-pause-a-game-how-to-make-script-in-movieclip/251776/1 "2008-02-12T15:59:01Z")

</div>

I didnt find much info on this via google, so the question comes here…how to pause a game? meaning, i press a button and it is paused, and one second button it unpauses. in most places i saw that they frame speed to 0 or something like that, which i dont like…so what yould be the best way in as2?

For my second question, when we duplicate or attach a movieclip to stage, we generally use a variable to keep track of it and through that identity, we run a script on it. but is there a way to put the code within the clip, such that when we put it on stage, the code is automatically run?
