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

Flash Animate AS 3.0 - reset game fx issue

New Here ,
Jun 06, 2017 Jun 06, 2017

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?

Views

143

Translate

Translate

Report

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

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.

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

So what code would work best for resetting my game?

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

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