This code works fine in actionscript 3 when my target is 10.3 and up but when my target is flash player 9, it gives me the error Scene 1,
Layer 'Layer 1', Frame 1, Line 7 1119: Access of possibly undefined property L through a reference with static type Class.
Anyone know how I can fix this so that it works in flash player 9? I already tried changing the keyboard.(keycode#) and even trying it with what is apparently the flash player 9 keycode syntax? but everything I tried is failing. I cannot find a solution online, anyone got any ideas? thanks
var lDown:Boolean = false;
var sDown:Boolean = false;
var dDown:Boolean = false;
stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyBoardDown);
function onKeyBoardDown(e:KeyboardEvent):void
{
if (e.keyCode == Keyboard.L)
{
lDown = true;
}
if (lDown == true)
{
if (e.keyCode == Keyboard.S)
{
sDown = true;
}
}
if (sDown == true)
{
if (e.keyCode == Keyboard.D)
{
dDown = true;
}
}
if (dDown == true)
{
trace("ehhh");
}
}