Hello.
In my as3 code using Flash cs3, everything works fine without any document class. I can use event handlers and they work. But, once I attach a document class, I start to get this error: 1046: Type was not found or was not a compile-time constant: KeyboardEvent.
Could somebody explain why this occurs? This is what my document class looks like:
package {
import flash.display.Sprite;
import flash.events.Event;
import flash.utils.Timer;
import flash.events.TimerEvent;
import flash.display.MovieClip;
import flash.geom.Point;
import flash.geom.Matrix
import flash.ui.Keyboard;
import flash.Event.KeyboardEvent;
import flash.Event.MouseEvent;
import flash.events.KeyboardEvent;
import flash.events.MouseEvent;
public class myCoolClass extends MovieClip {
}
}
But then, I start to get more errors. I get: 1180: Call to a possibly undefined method SoundTransform.
.
Do I have to keep adding more import
's in order to have it run properly?
Thanks