# Pausing Animation by on keyPress function

**URL:** <https://forum.kirupa.com/t/pausing-animation-by-on-keypress-function/228117>\
**Category:** Uncategorized\
**Created:** [June 5, 2007, 2:18pm UTC](https://forum.kirupa.com/t/pausing-animation-by-on-keypress-function/228117 "2007-06-05T14:18:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![midan](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/midan/32/3703_2.png) [@midan](https://forum.kirupa.com/u/midan)\
**Post date:** [June 5, 2007, 2:18pm UTC](https://forum.kirupa.com/t/pausing-animation-by-on-keypress-function/228117/1 "2007-06-05T14:18:14Z")

</div>

Hi, i try to make pausing in animation using on (keyPress “\<Space\>”) function, a have read tutorial Pausing Animation [http://www.kirupa.com/developer/mx2004/pause.htm](http://www.kirupa.com/developer/mx2004/pause.htm) ,in this tutorial is used butons but i need with on (keyPress “\<Space\>”)

I try

```auto
on (keyPress "<Space>") {
play();
}

```

not work, please help
