# keyPressing not working

**URL:** <https://forum.kirupa.com/t/keypressing-not-working/212119>\
**Category:** flash\
**Created:** [January 8, 2007, 6:19pm UTC](https://forum.kirupa.com/t/keypressing-not-working/212119 "2007-01-08T18:19:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![haam](https://avatars.discourse-cdn.com/v4/letter/h/a698b9/32.png) [@haam](https://forum.kirupa.com/u/haam)\
**Post date:** [January 8, 2007, 6:19pm UTC](https://forum.kirupa.com/t/keypressing-not-working/212119/1 "2007-01-08T18:19:21Z")

</div>

Hi All - I could really use your help here.

I’ve tried using keyListeners and am getting extremely buggy results so I decided to put my keyPress commands directly on a button. I know, I know, not best practice - but I’m at the end of my rope here and I just need it to work, now.

Here’s my scenario:

I’m working on a presentation where there is a Main.swf and a Retailer.swf. The Main.swf loads in the Retailer.swf which in turn loads in it’s own other .swf files when it needs to.

In my Retailer.swf I have a hidden button that has the following code:

```auto

on (release) {
    trace("pressed");
    this.gotoAndPlay("logoIn");
}
//
on(keyPress "<Space>"){
    trace("SPACE");
    this.gotoAndPlay("logoIn");
}
//
on(keyPress "<Enter>"){
    trace("ENTER");
    this.gotoAndPlay("logoIn");
}
//
on(keyPress "<Right>"){
    trace("RIGHT");
    this.gotoAndPlay("logoIn");
}
//
on(keyPress "<PageDown>"){
    trace("PAGE DOWN");
    this.gotoAndPlay("logoIn");
}
//
on(keyPress "<Down>"){
    trace("DOWN");
    this.gotoAndPlay("logoIn");
}

```

As you can see they are all doing the same thing. Tracing for identification and telling the current movie to go somewhere.

The problem is that when I run Retailer.swf on it’s on the Button Press and keyPress commands work perfectly. However, when I run the Main.swf and it loads in Retailer.swf the keyPress commands are ignored. The button Press works properly but not the keyPresses.

It’s not a pathing problem because if the button Press is working then there seems to be no reason why this crap isn’t working for me.

PLEASE ADVISE!!! I’m pulling out my hair! :red:

-mikey
