Hi,
I found this code on a website that enables the cursor to become transparent upon leaving the screen. It works fine by itself, however when I try to use it with another code an error message shows it that it needs another bracket as well as an unnecessary bracket.
function Start() {
stage.addEventListener(Event.MOUSE_LEAVE,cursorHide);
stage.addEventListener(MouseEvent.MOUSE_MOVE,cursorFollow);
}
function cursorHide(evt:Event):void {
cursor.gotoAndPlay("104");
}
function cursorFollow(evt:MouseEvent):void {
if (cursor.currentFrame != 0) {
cursor.gotoAndStop(1);
}
cursor.x = stage.mouseX;
cursor.y = stage.mouseY;
evt.updateAfterEvent();
}
Is there any way to simplify this coding and to ensure that it works with other code?
Any help would be greatly appreciated.
Tom