 this is really the most strange problem i ever had.
I've created my own flash game and it creates a checksum which it send along with the score to a php script. Which creates a highscore list.
The checksum is proving to be a problem. The php script is taking the score and creating a checksum.
The flash is taking the score and creating the checksum and is then supposed to send it.
There's just one problem..
When i take a look at my flash in swishmax and use the trace function to see if the checksum is calculated correctly everything seems fine.
But when export it to a html or flashplayer the variable gets send out wrong.
Flash code:
Code:
_root.scoreprecheck = _root.score*63478256;
_root.scorecheck = 0;
for (c=0; c<length(_root.scoreprecheck); c++) {
_root.scorecheck+=_root.scoreprecheck.substr(c,1)*(c+1);
_root.scorecheck-= "1";
}
trace(_root.scorecheck);
With a score of 200 this would result in 170. The trace does tell me it's 170 but when i play the game in flashplayer or in the web it doens't submit 170. It submits -11.
I don't get this at all. Maybe there's a different engine running swishmax or something?
Dont know hope somebody can help me with this.. I'm getting nowere
Don't know what good it would do but this is the code i'm using to submit to the php.
Code:
scorecheck = _root.scorecheck;
getURL("http://localhost/test.php","_blank","POST");
Need help
Greetz
Thierry
|