开发者

Flex access of undefined property EVENT

I am working in Flex Builder 3 and I am trying to figure out this error. The error console reads "Access of undefined property EVENT." I am not understanding why this error is showing when I have already imported flash.events.Event. Flex is not recognizing with even the hinting helper pop up that appears when I type the addEventListener( . It should appear after the opening parenthesis right? Also, I cleaned the targets and still no luck. Thanks!

pac开发者_运维知识库kage {

    import flash.display.Sprite;
    import flash.events.Event;

    public class testing extends Sprite
    {
        public function testing()
        {
            addEventListener(EVENT.ENTER_FRAME, loop);
        }
        private function loop(e:Event):void
        {
        }
    }
}


Actionscript is key sensitive

like this:

addEventListener(Event.ENTER_FRAME, loop);

not like this:

addEventListener(EVENT.ENTER_FRAME, loop);

wakey wakey :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜