# Movement started with key press and not stopped until collision detected

**URL:** https://forum.kirupa.com/t/movement-started-with-key-press-and-not-stopped-until-collision-detected/78513
**Category:** Uncategorized
**Created:** [February 5, 2005, 9:12am UTC](https://forum.kirupa.com/t/movement-started-with-key-press-and-not-stopped-until-collision-detected/78513 "2005-02-05T09:12:29Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![AN828](https://avatars.discourse-cdn.com/v4/letter/a/f19dbf/32.png) [@AN828](https://forum.kirupa.com/u/AN828)
#### Post date: [February 5, 2005, 9:12am UTC](https://forum.kirupa.com/t/movement-started-with-key-press-and-not-stopped-until-collision-detected/78513/1 "2005-02-05T09:12:29Z")

</div>

I want to create movement in a movieclip when an arrow key is pressed. I want the movieclip to start moving and not stop until a hitTest recognizes a collision with another object and then tells it to stop. I want the key to only have to be pressed once to start movement and not have to stayed pressed down. How would I do this?
