How to make mouse become normal again on an other scene
Hi guys, so I have this bit of code :
import flash.events.MouseEvent;
import flash.events.Event;
stop();
addEventListener(Event.ENTER_FRAME, GetMouse);
function GetMouse(event:Event)
{
if(mouseX>365 && mouseX<613 && mouseY <170 && mouseY >120)
{
Mouse.cursor="button";
addEventListener(MouseEvent.MOUSE_DOWN, goToLevel);
function goToLevel(event:MouseEvent):void
{
gotoAndStop(1, "Lv1");
}
}
else if(mouseX>365 && mouseX<613 && mouseY <234 && mouseY >185)
{
Mouse.cursor="button";
addEventListener(MouseEvent.MOUSE_DOWN, goToLevelSelect);
function goToLevelSelect(event:MouseEvent):void
{
gotoAndStop(2, "LvSelect");
}
}
else
{
Mouse.cursor="auto";
}
}
And it basically makes my first scene have 2 clickable buttons that lead me to a 2nd and 3rd scene. The problem is that once I am on scene 2 or 3, the cursor stays like if it was on a button when i put it over the zone i defined in the other scene, I thought code would not affect my other scenes that's why I did that. Is there any way I can make my cursor go back to normal in the other scenes? ![]()
