# Problem with checkkeys \[renamed\]

**URL:** <https://forum.kirupa.com/t/problem-with-checkkeys-renamed/219896>\
**Category:** flash\
**Created:** [March 20, 2007, 11:56pm UTC](https://forum.kirupa.com/t/problem-with-checkkeys-renamed/219896 "2007-03-20T23:56:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chaztheman](https://avatars.discourse-cdn.com/v4/letter/c/eb9ed0/32.png) [@chaztheman](https://forum.kirupa.com/u/chaztheman)\
**Post date:** [March 20, 2007, 11:56pm UTC](https://forum.kirupa.com/t/problem-with-checkkeys-renamed/219896/1 "2007-03-20T23:56:26Z")

</div>

I have this code in the first frame of the time line which should move the mc called ‘bcar’ but nothing happens.

(im pretty sure there is nothing wrong with the blue bits and i think the problem lies within the green parts!)

```auto
 
stop();
[COLOR=green]function checkKeys() { [/COLOR]
[COLOR=green]if (Key.isDown(Key.RIGHT)) {[/COLOR]
 
[COLOR=blue]_root.bcar._rotation += 2[/COLOR]
 
[COLOR=green]}[/COLOR]
[COLOR=green]if (Key.isDown(Key.LEFT)) { [/COLOR]
 
 [COLOR=blue]_root.bcar._rotation -= 2[/COLOR]
 
[COLOR=green]} [/COLOR]
[COLOR=green]if (Key.isDown(Key.UP)) { [/COLOR]
[COLOR=green]FwdSpd = 2[/COLOR]
 
[COLOR=blue]var deg =(_root.bcar._rotation*(math.PI/180))[/COLOR]
[COLOR=blue]_root.bcar._x = _root.bcar._x + FwdSpd*math.sin(deg)[/COLOR]
[COLOR=blue]_root.bcar._y = _root.bcar._y - FwdSpd*math.cos(deg)[/COLOR]
 
[COLOR=green]}[/COLOR]
[COLOR=green]if (Key.isDown(Key.UP)) { [/COLOR]
[COLOR=green]FwdSpd = 2[/COLOR]
 
[COLOR=blue]var deg =(_root.bcar._rotation*(math.PI/180))[/COLOR]
[COLOR=blue]_root.bcar._x = _root.bcar._x - FwdSpd*math.sin(deg)[/COLOR]
[COLOR=blue]_root.bcar._y = _root.bcar._y + FwdSpd*math.cos(deg)[/COLOR]
 
[COLOR=green]}[/COLOR]
[COLOR=green]}[/COLOR]

```

Thanks!!

Chaztheman
