Copy link to clipboard
Copied
reset game function issue when publishing to an .exe
Code...
//Reset Game Function
function resetGame(event:MouseEvent){
var url:String = stage.loaderInfo.url;
var request:URLRequest = new URLRequest(url);
navigateToURL(request,"_level0");
}
The above code works in the .swf format but when published as a Win projector file (.exe), it only returns a blank screen after it is initiated. How do I fix this?
Copy link to clipboard
Copied
Projectors run as stand-along executables, not in a web browser. Of course anything to do with URLs is going to be non-functional. Looks like you're going to have to reset things properly instead of force-reloading the entire game.
Copy link to clipboard
Copied
So what code would work best for resetting my game?
Copy link to clipboard
Copied
That's like asking a stranger how to get home. It's your code, your game. Only you know what needs to be reset and reinitialized.