1046: Type was not found or was not a compile-time constant: Event.
I am more than a little frustrated. I'm using Flash Professional CS5.5, attempting to publish ActionScript 3.0 for FlashPlayer 10.2
My code begins with:
import flash.events.MouseEvent;
import flash.events.Event;
import flash.events.KeyboardEvent;
import flash.utils.Timer;
import flash.events.TimerEvent;
Then much later I have:
teamFourCar_mc.addEventListener(Event.ENTER_FRAME, trackPosition);
function trackPosition (event:Event)
{
and I keep getting a compiler error:
| Scene 1, Layer 'actions', Frame 1, Line 434 | 1046: Type was not found or was not a compile-time constant: Event. |
I have imported the class "Events". I have successfully used the same construction in other scripts... in fact, virtually the same construction is included in Code Snippets as Fade In and Fade Out. Adding ":void" after (event:Event) makes no difference. I have Googled - to no avail - and spent the better part of a day reading through the on-line help files, but the solution is still eluding me.
It's probably so simple I'm going to smack myself in the forehead and mutter "Duh!" when I find a solution...
If you can do anything to hasten that event (no pun intended) I (with the possible exception of my forehead) will be very grateful.
TIA
Terry
