# Key presses: a hard thing

**URL:** https://forum.kirupa.com/t/key-presses-a-hard-thing/35145
**Category:** flash
**Created:** [November 10, 2003, 11:48pm UTC](https://forum.kirupa.com/t/key-presses-a-hard-thing/35145 "2003-11-10T23:48:34Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![zeka](https://avatars.discourse-cdn.com/v4/letter/z/c6cbf5/32.png) [@zeka](https://forum.kirupa.com/u/zeka)
#### Post date: [November 10, 2003, 11:48pm UTC](https://forum.kirupa.com/t/key-presses-a-hard-thing/35145/1 "2003-11-10T23:48:34Z")

</div>

i cannot understand keypresses from the actionscript diactionary at all!

ive got a mc and i want it to move left when a certain button (left arrow) is pressed. i cannot figure out how to to this because when i drag the “on key down” script out of the action script diactionary, beside it says \<not set yet\>

wut does that mean and can anyone help me with my actionscript??

---

<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: [November 11, 2003, 1:06am UTC](https://forum.kirupa.com/t/key-presses-a-hard-thing/35145/2 "2003-11-11T01:06:54Z")

</div>

ok, draw a box. highlight the box and hit F8. Give it a name of “button” and click on “movie clip.” Now click on the (now movieclip) box, and look in the lower left properties. see where it says “instance name” give it the instance name of box\_ mc. now draw a circle, highlight it, press F8, name it circle, select movie clip, click on it (now a movie clip), look at properties \> instance name and name it circ\_mc. ok, now click on the first frame of your timeline and hif F9 to open the actions panel (if it isnt already open) then you are going to want to type (or copy and paste) this.

```auto

leftdet = 10;
circ_mc.onPress = function(){
_root.box_mc._x-=leftdet;
}

```

I have attached a version with some more things you can do with this these things.(edit: wow, that is some HORRIBLE grammer, I must have been REALLY tired last night)

---

<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: [November 11, 2003, 10:44am UTC](https://forum.kirupa.com/t/key-presses-a-hard-thing/35145/3 "2003-11-11T10:44:14Z")

</div>

[http://search.atomz.com/search/?sp-advanced=1&sp-q=Key%20press&B1=search&sp-a=00040c2f-sp00000000&sp-w-control=1;](http://search.atomz.com/search/?sp-advanced=1&sp-q=Key%20press&B1=search&sp-a=00040c2f-sp00000000&sp-w-control=1;) :trout:
