Hi,
I have had a look around and cannot find anyone who has tried to do this.
I have added a custom mouse pointer to my AS - its a large circle.
I would like to be able to alter the focus of the pointer so that the selections are made from the center of the circle rather than from the edge.
I cannot work out how to do this.
Any help would be much appreciated.
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;
import flash.events.MouseEvent;
var myCursor:Sprite;
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
function init()
{
Mouse.hide();
myCursor = new MyCursorClass();
myCursor.mouseEnabled = false;
myCursor.visible = false;
addChild(myCursor);
// respond to mouse move events
stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
stage.addEventListener(Event.MOUSE_LEAVE, mouseLeaveHandler);
}
function mouseMoveHandler(evt:MouseEvent):void
{
// whenever the mouse moves, place the cursor in the same spot
myCursor.visible = true;
myCursor.x = evt.stageX;
myCursor.y = evt.stageY;
}
function mouseLeaveHandler(evt:Event):void
{
myCursor.visible = false;
}
init();
North America
Europe, Middle East and Africa
Asia Pacific