Search code examples
phpflashnetwork-programmingflash-cs5

MiniGame works fine in FlashCS5 but fails Online


I was wondering what is everyone's experience are on why a network request would work in FlashCS5 and in a browser locally but when I post it online it fails. The survivorId is sent from the string query. Both tests were done calling a network database.

I've tried the following:

Outputting the survivorId in a text field and seeing if the parameter variables were being sent correctly.

Set the "Networking Only" option in the publish settings.

Also is there a way to output trace actions from browsers for more in depth debugging?

*EDIT: I have recreated the bug locally in a browser. Without trace actions i don't know if i can figure it out.

*EDIT2: That bug only showed up because its from localhost (apologies, this is just weird)

Here's my code, there is the "Stage" then it goes "localSurvivor"(movieClip) then in side that localSurvivor movieclip the "lPlayer" class is addChild() to localSurvivor MovieClip

Stage-> localSurivor-> lPlayer(survivorId);

On the stage is this code:

//Set localP Id
var survId:Number = root.loaderInfo.parameters.sId;
//Object(root).informationTxt.text = survId;

//Load Movie Clip Classes_____________________________

//Load Local Survivor
var localP:MovieClip = new lPlayer(survId);

//Add to stage
Object(root).localPlayer.addChild(localP);
//------------------------------------------

Then inside the lPlayer Class:

public function lPlayer(survId:Number) {
    //First retrieve player information(Position, SWF File, MapId, etc, etc)
    //Prepare data to request
    netVariables.act            = "fortDetails";
    netVariables.survivorId     = survivorId;
    netRequest.method           = URLRequestMethod.POST
    netRequest.data             = netVariables;
    netLoader.dataFormat        = URLLoaderDataFormat.VARIABLES;

    //Attach Event Handler to proccess data
    netLoader.addEventListener(Event.COMPLETE, proccessFirstRun);
}

private function proccessFirstRun(rawData:Event) {
    var playerInfo = rawData.target.data

    //Player Info Loaded, Load the player onto the board
    this.x = playerInfo.setx;
    this.y = playerInfo.sety;

    //Activate remote Survivors with fortId
    Object(root).remotes.changeLevel(playerInfo.fid);
    Object(root).zombieContain.changeLevel(playerInfo.fid);
}

//Request Data
netLoader.load(netRequest);

Solution

  • hm, you just added a note that you've reproduced the bug locally. In that case we no longer have any information to go on. To trace in Firefox use http://blog.coursevector.com/flashbug