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!)
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