# Game

**URL:** <https://forum.kirupa.com/t/game/15852>\
**Category:** Uncategorized\
**Created:** [March 18, 2003, 7:45pm UTC](https://forum.kirupa.com/t/game/15852 "2003-03-18T19:45:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![luster](https://avatars.discourse-cdn.com/v4/letter/l/ec9cab/32.png) [@luster](https://forum.kirupa.com/u/luster)\
**Post date:** [March 18, 2003, 7:45pm UTC](https://forum.kirupa.com/t/game/15852/1 "2003-03-18T19:45:28Z")

</div>

Hi I’m making a game but I’m not that good at Flash so I have a problem.

I know how to control objects using your keyboard, like in tutorial, and i usethis to move an object to left and right ( i disabled DOWN and UP keys). now it has to drop something by presssing Ctrl or so. Any idea how to do this?

Luster

---

<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:** [March 18, 2003, 8:36pm UTC](https://forum.kirupa.com/t/game/15852/2 "2003-03-18T20:36:32Z")

</div>

Can you rephrase that please

---

<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:** [March 18, 2003, 9:44pm UTC](https://forum.kirupa.com/t/game/15852/3 "2003-03-18T21:44:22Z")

</div>

I’m not quite sure what you’re asking but i think you should be able to use

```php

on (keypress"<Ctrl>") {
(put your actions here)
}

```

---

<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:** [March 18, 2003, 9:45pm UTC](https://forum.kirupa.com/t/game/15852/4 "2003-03-18T21:45:57Z")

</div>

sorry, my mistake you’ll probably have to use the space bar instead. like this

```php

on (keyPress "<Space>") {
	(your actions)
}

```

---

<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:** [March 18, 2003, 10:10pm UTC](https://forum.kirupa.com/t/game/15852/5 "2003-03-18T22:10:41Z")

</div>

If it’s for a game… Then place this in your main game loop.

[AS]  
if(Key.isDown(Key.CONTROL))  
{  
dropSomething();  
}  
[/AS]

There you go man… Or you can do the onpress factor of that… But… If it’s for a game… I’d suggest this style right here.
