Web Hosting Talk







View Full Version : Making flash send score to PHP?


WHMAPInstaller
10-16-2005, 01:09 PM
Hi,
I own a small website and recently downloaded an arcade game pack which has games from 2DPlay, they gave me the SWF files, is there anyway to make these games send the high score to a PHP file which can process the score (I can take care of the PHP end but dont know anything about flash)?

Thanks!

marsian
10-17-2005, 08:34 PM
there are different ways of sending variables from flash to php, the most easiest way for you will be just call an URL like getURL("store.php?score="+hiscore, "_self");

WHMAPInstaller
10-17-2005, 10:55 PM
Would this require FLA files?

renleon
10-18-2005, 08:16 AM
Yes it would, your going to need the fla to alter the code.

If you can get the fla its pretty easy to send the score to a php file. Ill give you an example if you can.

Like marsian says, its just a case of using getURL.

Without the fla though I think your pretty much stuck.

Flasher
10-18-2005, 07:41 PM
Another method to send the variables to PHP is the loadVariables command. Somehting like:

loadVariablesNum("yourScript.php", 0, "POST");

Yes, the FLA is necessary to edit the SWF...

WHMAPInstaller
10-21-2005, 06:12 PM
Well this arises the problem of where to get a few flash games with FLA included......

yash07
10-24-2005, 04:34 AM
You can always google for flash games, and/or you could request 2Dplay to provide you a copy of the .swf with the code suggested above, and/or ask 2dplay whether you can decompile their .swf to add the line of code, whilst preserving their copyright.