Simple Scribble : Stage : Development Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Development » Stage »

 

Simple Scribble


 

package {
  import flash.display.*;
  import flash.events.*;

  public class Main extends Sprite {
    public function Main(  ) {
      stage.frameRate = 1;
      graphics.moveTo(stage.mouseX, stage.mouseY);
      stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveListener);
    }

    private function mouseMoveListener (e:MouseEvent):void {
      graphics.lineStyle(20xFF0000);
      graphics.lineTo(e.stageX, e.stageY);
    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo Development
» Stage