Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Flash Animate AS 3.0 - reset game fx issue

New Here ,
Jun 06, 2017 Jun 06, 2017

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?

181
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 06, 2017 Jun 06, 2017

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 06, 2017 Jun 06, 2017

So what code would work best for resetting my game?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 06, 2017 Jun 06, 2017
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines