addEventListener(Event.ENTER_FRAME, onEnterFrame); function onEnterFrame(e:Event):void { trace("ok"); }