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

SWF- 177739 (Error)

New Here ,
Apr 23, 2019 Apr 23, 2019

Copy link to clipboard

Copied

hello all,

I need helping ASAP. I have been trying to create a game for Android mobile app for my class and i keep getting the below error message

”mobile game.swf-177739 bytes after decompression. I have NO IDEA what this means. I have tried creating it on both my Mac and Windows and the same error is coming up. I asked my teacher and she doesn't know either.

HELLLLLLLLP

Views

598

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

correct answers 1 Correct answer

Community Expert , Apr 25, 2019 Apr 25, 2019

Hi again.

Thanks.

I found out two issues in your project and after fixing them I was able to deploy to my Android phone.

Issues:

- Your code is referencing a statusMsg text field. But in your FLA the text field is called StatusMsg (with capital S). So I changed the text field name in the fla to statusMsg;

- Your JSON file is not human readable or corrupted. If you try to open it in a text editor like Visual Studio, you're gonna get a message telling you that it is either binary or uses an unsupported

...

Votes

Translate

Translate
Community Expert ,
Apr 23, 2019 Apr 23, 2019

Copy link to clipboard

Copied

Hi.

This is not an error. It's just informing you the size of the exported SWF.

Regards,

JC

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 ,
Apr 23, 2019 Apr 23, 2019

Copy link to clipboard

Copied

thank you, however, my game questions wont populate/ do you know how I can correct this?

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
Community Expert ,
Apr 23, 2019 Apr 23, 2019

Copy link to clipboard

Copied

Is there any error being shown in the Window > Compiler Errors panel (Option/Alt + F2) or in the Window > Output panel (F2)?

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 ,
Apr 23, 2019 Apr 23, 2019

Copy link to clipboard

Copied

No, that is the only thing that it says.

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
Community Expert ,
Apr 24, 2019 Apr 24, 2019

Copy link to clipboard

Copied

Can you post a link to your FLA? Because we need to see your code.

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 ,
Apr 24, 2019 Apr 24, 2019

Copy link to clipboard

Copied

how do you post a link?

Quiz Game

package com.josephlabrecque {

  import flash.display.MovieClip;

  import flash.text.TextField;

  import flash.display.SimpleButton;

  import flash.events.Event;

  import com.josephlabrecque.QuestionBank;

  import flash.events.MouseEvent;

  import flash.utils.setTimeout;

  public class QuizGame extends MovieClip {

    public var trueBtn:SimpleButton;

    public var falseBtn:SimpleButton;

    public var questionText:TextField;

    public var statusMsg:TextField;

    private var questionBank:QuestionBank;

    private var questionArray:Array;

    private const questionMax:int = 5;

    private var questionCount:int = 0;

    private var currentAnswer:String;

    private var currentScore:int = 0;

    public function QuizGame() {

      statusMsg.text = "";

      questionArray = new Array();

      questionBank = new QuestionBank();

      questionBank.addEventListener(Event.COMPLETE, dataReady);

      trueBtn.addEventListener(MouseEvent.CLICK, truePressed);

      falseBtn.addEventListener(MouseEvent.CLICK, falsePressed);

    }

    private function truePressed(e:MouseEvent):void {

      if(statusMsg.text == ""){

        if(currentAnswer == "true"){

          currentScore += 100/questionMax;

          statusMsg.text = "CORRECT!";

        }else{

          statusMsg.text = "WRONG";

        }

        setTimeout(newQuestion, 1000);

      }

    }

    private function falsePressed(e:MouseEvent):void {

      if(statusMsg.text == ""){

        if(currentAnswer == "false"){

          currentScore += 100/questionMax;

          statusMsg.text = "CORRECT!";

        }else{

          statusMsg.text = "WRONG";

        }

        setTimeout(newQuestion, 1000);

      }

    }

    private function dataReady(e:Event):void {

      questionArray = questionBank.buildBank();

      grabQuestion();

    }

    private function newQuestion():void {

      statusMsg.text = "";

      trace(currentScore);

      grabQuestion();

    }

    private function grabQuestion():void {

      if(questionCount < questionMax){

        var max:int = questionArray.length-1;

        var rq:int = Math.floor(Math.random() * (max - 0 + 1));

        var ta:Array = questionArray.splice(rq, 1);

        questionText.text = ta[0].q;

        currentAnswer = ta[0].tf;

        questionCount++;

      }else{

        gameOver();

      }

    }

    private function gameOver():void {

      statusMsg.text = currentScore+"/100 points";

      questionText.text = "Game Over!";

    }

  }

}

Question Bank

package com.josephlabrecque {

import flash.net.URLRequest;

import flash.net.URLLoader;

import flash.events.Event;

import flash.events.EventDispatcher;

public class QuestionBank extends EventDispatcher {

private const JSON_URL: String = "data/questions.json";

private var jsonRequest: URLRequest;

private var jsonLoader: URLLoader;

private var questionArray: Array;

public function QuestionBank() {

questionArray = new Array();

loadJSON();

}

private function loadJSON(): void {

jsonRequest = new URLRequest(JSON_URL);

jsonLoader = new URLLoader();

jsonLoader.addEventListener(Event.COMPLETE, jsonLoaded);

jsonLoader.load(jsonRequest);

}

private function jsonLoaded(e: Event): void {

var jsonData: Object = JSON.parse(e.target.data);

for each(var question: Object in jsonData.questions) {

questionArray.push(question);

}

dispatchEvent(new Event(Event.COMPLETE));

}

public function buildBank(): Array {

var b: Array = new Array();

var max: int = questionArray.length;

for (var i: int = 0; i < max; i++) {

b.push({

q: questionArray.q,

tf: questionArray.tf

});

}

return b;

}

}

}

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
Community Expert ,
Apr 25, 2019 Apr 25, 2019

Copy link to clipboard

Copied

Hi. Thanks.

But can you share the actual FLA? You can upload it to Google Drive, Dropbox, WeTransfer, One Drive, or another file sharing service of your choice and post the link here.

But before investigating your file, I see that you're loading a JSON file. Are you including the JSON file in the AIR properties?

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 ,
Apr 25, 2019 Apr 25, 2019

Copy link to clipboard

Copied

No, I never knew I had to upload this file there. I never got to the publish part I just kept doing test as that’s how the book did it. So was I supposed to do this after I wrote all of the code?

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
Community Expert ,
Apr 25, 2019 Apr 25, 2019

Copy link to clipboard

Copied

You can do this at any moment. You can do this now.

It's because if you don't do this, Animate CC won't include the JSON file in the app directory/bundle.

Also mobile platforms are not like desktop platforms. You can't just put your files anywhere and save/load them from any place.

You have specific folders that you're allowed to access.

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 ,
Apr 25, 2019 Apr 25, 2019

Copy link to clipboard

Copied

Okay, I just loaded the file and still nothing. Stand by and I will upload them to google dropbox

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 ,
Apr 25, 2019 Apr 25, 2019

Copy link to clipboard

Copied

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 ,
Apr 25, 2019 Apr 25, 2019

Copy link to clipboard

Copied

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
Community Expert ,
Apr 25, 2019 Apr 25, 2019

Copy link to clipboard

Copied

Hi again.

Thanks.

I found out two issues in your project and after fixing them I was able to deploy to my Android phone.

Issues:

- Your code is referencing a statusMsg text field. But in your FLA the text field is called StatusMsg (with capital S). So I changed the text field name in the fla to statusMsg;

- Your JSON file is not human readable or corrupted. If you try to open it in a text editor like Visual Studio, you're gonna get a message telling you that it is either binary or uses an unsupported text encoding. So I created a temp JSON file called questions_temp.json to test the game.

Another thing I had to do was to include the data folder that contains the JSON files like I described in comment #7.

Here is a link with the corrected files and structure, and also with an APK if you want to test in a Android device right away.

PierreLawsonGame.zip - Google Drive

I hope this helps.

Regards,

JC

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 ,
Apr 25, 2019 Apr 25, 2019

Copy link to clipboard

Copied

LATEST

Oh wow, I truly appreciate it, I didn't realize that I messed up so much. I will try it now. Thank you so much.

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