Handling Events : Event : Development Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Development » Event »

 

Handling Events


 

package {
    import flash.display.Sprite;
    import flash.events.Event;
    
    public class Main extends Sprite {
        
        public function Main(  ) {
            graphics.lineStyle(101);
            addEventListener(Event.ENTER_FRAME, onEnterFrame);
        }

        private function onEnterFrame(event:Event):void {
            graphics.lineTo(Math.random(  ) 400, Math.random(  ) 400);
        }
    }
}

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo Development
» Event