# Gunboat

**URL:** <https://forum.kirupa.com/t/gunboat/25865>\
**Category:** flash\
**Created:** [July 17, 2003, 3:23am UTC](https://forum.kirupa.com/t/gunboat/25865 "2003-07-17T03:23:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Flingotravels](https://avatars.discourse-cdn.com/v4/letter/f/71e660/32.png) [@Flingotravels](https://forum.kirupa.com/u/Flingotravels)\
**Post date:** [July 17, 2003, 3:23am UTC](https://forum.kirupa.com/t/gunboat/25865/1 "2003-07-17T03:23:54Z")

</div>

:rambo: How do you make something rotate with a keypress?

---

<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:** [July 17, 2003, 5:01am UTC](https://forum.kirupa.com/t/gunboat/25865/2 "2003-07-17T05:01:18Z")

</div>

make what you want to rotate a MC…  
then drag the MC onto your movie…  
then add the script below into the MCs actions…

if (Key.isDown(Key.LEFT)) {  
\_rotation -= 15;  
}  
if (Key.isDown(Key.RIGHT)) {  
\_rotation += 15;  
}

that should do it…

---

<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:** [July 17, 2003, 5:03am UTC](https://forum.kirupa.com/t/gunboat/25865/3 "2003-07-17T05:03:47Z")

</div>

[AS]  
if (Key.isDown(Key.LEFT)) {  
\_rotation -= 15;  
}  
if (Key.isDown(Key.RIGHT)) {  
\_rotation += 15;  
}

[/AS]

this might be easier to copy!!!
