Flash Cs 3 As 3.0 Help Movement?

Shawn B

New member
I get This error: 1119: Access of possibly undefined property charCode through a reference with static type Class.

function reportKeyDown(event:KeyboardEvent):void{
var KeyCharCode:uint = Event.charCode;
if (KeyCharCode == 37){ // 97 = a 37 = left
Cannon.rotation -= RotationMS;}

var KeyCharCode:uint = Event.charCode;
if (KeyCharCode == 39){ // 100 = d 39 = right
Cannon.rotation += RotationMS;}
}
stage.addEventListener(KeyboardEvent.KEY_DOWN, reportKeyDown);
 
Back
Top