MouseEvent.MOUSE_MOVE : Triangle : Graphics Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Graphics » Triangle »

 

MouseEvent.MOUSE_MOVE


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

  public class Main extends Sprite {
    public function Main (  ) {
      // Create the triangle
      var triangle:Sprite = new Sprite(  );
      triangle.graphics.lineStyle(1);
      triangle.graphics.beginFill(0x00FF001);
      triangle.graphics.moveTo(250);
      triangle.graphics.lineTo(5025);
      triangle.graphics.lineTo(025);
      triangle.graphics.lineTo(250);
      triangle.graphics.endFill(  );
      triangle.x = 200;
      triangle.y = 100;

      addChild(triangle);

      triangle.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveListener);
    }

    private function mouseMoveListener (e:MouseEvent):void {
      trace("mouse move");
    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo Graphics
» Triangle