Keyboard input problem

Used this forum a long time to answer my actionscript questions, first time posting so thanks to anyone who can help me out.

I’m not quite sure why this isn’t working and I’m sure you guys know. I am just trying to get my keyboard input working. This is my document class:


package {

	import flash.display.MovieClip;
	import flash.events.*;

	public class Simon extends MovieClip {

		public function Simon() {

			function keysDown(event:KeyboardEvent):void {

				if (event.keyCode == 103) {
					trace("7");
				}

				if (event.keyCode == 105) {
					trace("9");
				}

				if (event.keyCode == 97) {
					trace("1");
				}

				if (event.keyCode == 99) {
					trace("3");
				}
			}
			stage.addEventListener(KeyboardEvent.KEY_DOWN, keysDown);

		}
	}
}

no errors, but doesn’t work…thanks again