import flash.events.MouseEvent; stage.addEventListener(MouseEvent.MOUSE_MOVE,showPos); function showPos (event:MouseEvent):void { xPos.text = "X: " + String(mouseX); yPos.text = "Y: " + String(mouseY); drawCrossHairs(); } function drawCrossHairs():void { // erases everything that has been drawn & dropping pencil graphics.clear(); // lineStyle() public function, specifies a line style used for subsequent calls to Graphics methods // such as the lineTo() method or the drawCircle() method graphics.lineStyle(1, 0xFF0000, 1); // moveTo() Moves the current drawing position to (x, y). graphics.moveTo(mouseX-35,mouseY); // lineTo() Draws a line using the current line style from the current drawing // position to (x, y); the current drawing position is then set to (x, y). graphics.lineTo(mouseX+35,mouseY); //graphics.lineStyle(1, 0x00FF00, 1); graphics.moveTo(mouseX, mouseY-35); graphics.lineTo(mouseX, mouseY+35); // drawCircle() Draws a circle. Set the line style, fill, or both before you call the // drawCircle() method, by calling the linestyle(), lineGradientStyle(), beginFill(), // beginGradientFill(), or beginBitmapFill() method. graphics.drawCircle(mouseX,mouseY,15); }