ultrapyro
October 14th, 2008, 07:57 AM
hey I have just started using the document class and I am now migrating towards full OOP w/no timeline this week. Its not easy though, and I'm beginning to have some problems that I am bumping into. I understand that this is a custom class, so I must import everything I use, and declare everything public/private etc... but I can't seem to figure out why I keep getting this error
line 22 - 1046: Type was not found or was not a compile-time constant: Event
Am I forgetting to import an event?
package
{
import flash.display.MovieClip;
import fl.transitions.easing.*;
import flash.events.Event.*;
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import flash.utils.Timer;
import flash.events.TimerEvent;
public class SpaceSciro extends MovieClip
{
public function SpaceSciro():void
{
trace("Con-FUNCTION - SpaceSciro - Document Class 1.0 has been loaded!");
this.stage.scaleMode = StageScaleMode.NO_SCALE;
this.stage.align = StageAlign.TOP_LEFT;
this.stage.addEventListener(Event.ENTER_FRAME, onStageResize);
}
private function onStageResize(e:Event):void
{
trace("Pri-FUNCTION - onStageResize - hello world");
}
}
}
thank you! for taking the time to help me:sonic::sonic::sonic:
line 22 - 1046: Type was not found or was not a compile-time constant: Event
Am I forgetting to import an event?
package
{
import flash.display.MovieClip;
import fl.transitions.easing.*;
import flash.events.Event.*;
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import flash.utils.Timer;
import flash.events.TimerEvent;
public class SpaceSciro extends MovieClip
{
public function SpaceSciro():void
{
trace("Con-FUNCTION - SpaceSciro - Document Class 1.0 has been loaded!");
this.stage.scaleMode = StageScaleMode.NO_SCALE;
this.stage.align = StageAlign.TOP_LEFT;
this.stage.addEventListener(Event.ENTER_FRAME, onStageResize);
}
private function onStageResize(e:Event):void
{
trace("Pri-FUNCTION - onStageResize - hello world");
}
}
}
thank you! for taking the time to help me:sonic::sonic::sonic: