i have no idea how but it seems to have sorted itself out when i turned it into a comment, then back into code. but im stll getting god damned errors! what the hell, heres my code, see whats wrong and how it should work
KEY EXAMPLE.fla file path is in the root folder
key.as file path is rootFolder/AS/key
.as code:
package AS.key{
import flash.events.KeyboardEvent;
public class Key {
public function keyInt(sta) {
sta.addEventListener(KeyboardEvent.KEY_DOWN, kd);
sta.addEventListener(KeyboardEvent.KEY_UP, ku);
}
private var keysCode:Array = [a lot of stuff];
private var keysString:Array = ["a lot of stuff'];
private var keyValues:Array = new Array();
private var l:uint = keysCode.length;
for (var p:uint = 0; p<l; p++) {
keyValues.push();
}
// INT. DONE
private function kd(e:KeyboardEvent):void {
for (var i:uint = 0; i<l; i++) {
if (e.keyCode == keysCode[i]) {
keyValues[i] = "true";
return;
}
}
}
private function ku(e:KeyboardEvent):void {
for (var i:uint = 0; i<l; i++) {
if (e.keyCode == keysCode[i]) {
keyValues[i] = 'false';
return;
}
}
}
public function KEY(e:String) {
var pl:uint = keysString.length;
for (var i:uint = 0; i<pl; i++) {
if (e == keysString[i]) {
if (keyValues[i] == "true") {
return true;
} else {
return false;
}
}
}
}
}
}
fla code:
import AS.key.key;
var key:Key = new Key(stage)
keyInt(stage)
errors:
name:
1046: Type was not found or was not a compile-time constant: Key.
source:
var key:Key = new Key(stage)
name:
1180: Call to a possibly undefined method Key.
source:
var key:Key = new Key(stage)
name:
1180: Call to a possibly undefined method keyInt.
source:
keyInt(stage)
all errors on my fla