# Turning "enter" key off?

**URL:** <https://forum.kirupa.com/t/turning-enter-key-off/19588>\
**Category:** Uncategorized\
**Created:** [April 29, 2003, 5:25pm UTC](https://forum.kirupa.com/t/turning-enter-key-off/19588 "2003-04-29T17:25:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ivanwright](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ivanwright/32/119_2.png) [@ivanwright](https://forum.kirupa.com/u/ivanwright)\
**Post date:** [April 29, 2003, 5:25pm UTC](https://forum.kirupa.com/t/turning-enter-key-off/19588/1 "2003-04-29T17:25:23Z")

</div>

i have a movie that has multiple scenes in it. i want to be able to move from scene to scene using a key press OTHER THAN “ENTER”.

thus far, i’ve neither been able to:

1. turn the “enter” key off or
2. make another key press move me along…

when testing my movie, when i press “enter” it moves on to the next scene. i assume this was by default or something… i don’t want that.

can anyone help?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 29, 2003, 5:38pm UTC](https://forum.kirupa.com/t/turning-enter-key-off/19588/2 "2003-04-29T17:38:35Z")

</div>

Pressing enter while testing it within Flash does do that… but thats only because while previewing in Flash the shortcut for “Play” is Enter. This does not happen in the standalone player, or on the web, just inside Flash.

But on the web if you right click it has the ability to play the movie. In that case before you publish your movie go to File/Publish Settings and in the HTML tab make sure you uncheck the “Show Menu” (or something like that) option. This will add extra code to your embed tag that removes the Play, Forward, Rewind, etc options from the right click menu.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 29, 2003, 5:43pm UTC](https://forum.kirupa.com/t/turning-enter-key-off/19588/3 "2003-04-29T17:43:09Z")

</div>

ok, that got the “turning the ‘enter’ key off” part… thanks!

i still can’t get another key to move me forward…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 29, 2003, 5:48pm UTC](https://forum.kirupa.com/t/turning-enter-key-off/19588/4 "2003-04-29T17:48:53Z")

</div>

Oh, sorry, I misunderstood your post. In that case you can use Listeners…

[AS]//create new object to listen to  
keyListen = new Object();  
//apply an onKeyDown dynamic event handler  
keyListen.onKeyDown = function() {  
//if the key that is down is NOT the enter key  
//note: “!” is an expression for false (think of it as saying “not”)  
if (!Key.isDown(Key.ENTER)) {  
//pretty obvious here  
//you can change these actions to whatever you want to do if any key (other than enter) has been pressed  
trace(“enter key not pressed”);  
}  
};  
//listen for when any keys are pressed  
Key.addListener(keyListen);[/AS]

Apply those actions to a frame in the timeline.

[edit]oh yeah, and if you ever want the keys NOT to listen… just remove the key listener…

[AS]Key.removeListener(keyListen);[/AS]

You can always reactivate it again later using

[AS]Key.addListener(keyListen);[/AS]

[/edit]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 29, 2003, 5:50pm UTC](https://forum.kirupa.com/t/turning-enter-key-off/19588/5 "2003-04-29T17:50:32Z")

</div>

thanks! i’ll try that and let you know if i can’t get it to work… thanks again!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 29, 2003, 5:51pm UTC](https://forum.kirupa.com/t/turning-enter-key-off/19588/6 "2003-04-29T17:51:24Z")

</div>

No prob… I have to go now… but just in case you didn’t see, I edited my last post on how to add/remove the listener for when you do and don’t want to have the keys being listened to.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 29, 2003, 5:52pm UTC](https://forum.kirupa.com/t/turning-enter-key-off/19588/7 "2003-04-29T17:52:00Z")

</div>

got it. gracious!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 29, 2003, 8:25pm UTC](https://forum.kirupa.com/t/turning-enter-key-off/19588/8 "2003-04-29T20:25:20Z")

</div>

Glad you got it all worked out 🙂
