# Key Press & gotoAndPlay

**URL:** https://forum.kirupa.com/t/key-press-gotoandplay/98193
**Category:** Uncategorized
**Created:** [January 4, 2004, 3:21pm UTC](https://forum.kirupa.com/t/key-press-gotoandplay/98193 "2004-01-04T15:21:43Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![samba\_7](https://avatars.discourse-cdn.com/v4/letter/s/bbce88/32.png) [@samba\_7](https://forum.kirupa.com/u/samba_7)
#### Post date: [January 4, 2004, 3:21pm UTC](https://forum.kirupa.com/t/key-press-gotoandplay/98193/1 "2004-01-04T15:21:43Z")

</div>

Dear all,

I have a movie that plays as an introduction. If a user wants to skip the movie and go to frame 225 but continue playing the movie then I thought I would use this code:

onEnterFrame = function() {  
if (Key.getcode() == Key.SPACE) {  
gotoAndPlay(225);  
}  
};

what actually happens is the movie skips to frame 225 but then stops. Now if I leave the movie to play from the start it will get to 225 and continue playing…

strange??? Yes…

Here is the file:  
[http://www.samblakeley.com/download/index\_january3.fla](http://www.samblakeley.com/download/index_january3.fla)

Any suggestions would be appreciated.  
Sam.

:bandit:
