Hi-score PHP/mysql in Flash. Question
I'm ready to add a hi-score table that uploads to a website using mysql, for a little game. I turned to the old tutorial on the tutorial page again since I'm not all up on PHP and some of the required events in mmf2.
But then I realised it needs a few extentions that may not be compatible with the flash export.
Is there a tutorial available that could explain a good setup for Falsh?
Re: Hi-score PHP/mysql in Flash. Question
You can use the Get object in Flash with much the same theory as the older PHP/SQL tutorials - note that (I think) you can only access PHP scripts in the same domain as where the Flash file is placed, but otherwise the process is the same.
Which object does the tutorial you're looking as use? If it's Live Receiver, then the actions are virtually the same - if it's Moosock, replace all the HTTP request gubbins with just a simple "Download from [this URL]" action.
Re: Hi-score PHP/mysql in Flash. Question
Thank you for that, David. Yes Jamie just mentioned Get object in click chat too, I hadn't used the object before and it sounds very useful.
The tutorial asks for Live reciever, String Tokenizer, URL Encoder and String Parser 2.
Get object covers Live reciever and I'm guessing URL encoder.
String Parser 2 should be covered by the String Parser included.
Shweet!
Re: Hi-score PHP/mysql in Flash. Question
Quote:
Originally Posted by DavidN
...note that (I think) you can only access PHP scripts in the same domain as where the Flash file is placed, but otherwise the process is the same.
Read this:
http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html
I haven't tried it yet, but it seems that you can just upload a policy file to the same domain as you swf that allows it to access domains outside of it's own.
The file is named "crossdomain.xml" and has this formatting:
Code:
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy
SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="example.com" />
</cross-domain-policy>
Just upload it to the root of the domain the swf is hosted from.
Re: Hi-score PHP/mysql in Flash. Question
Oh I see so it's the flash file that has the issue there, I was thinking it was facebook.
Cheers for that info!
Re: Hi-score PHP/mysql in Flash. Question
Dumb question, where can i find this "old" tutorial that is mentioned here?
Re: Hi-score PHP/mysql in Flash. Question
find it here: http://www.clickteam.com/website/usa/tutorials
Under "Advanced tutorials" called "Online Scores using PHP/mySQL"
Re: Hi-score PHP/mysql in Flash. Question
Re: Hi-score PHP/mysql in Flash. Question
That's an interesting find, UrbanMonk... if that works for people with the right access to their own webservers, then it would mean you could have one central high score/save table for your game and then distribute it around Flash sites like mad :)
Re: Hi-score PHP/mysql in Flash. Question
Quote:
Originally Posted by DavidN
That's an interesting find, UrbanMonk... if that works for people with the right access to their own webservers, then it would mean you could have one central high score/save table for your game and then distribute it around Flash sites like mad :)
Oh yes, just very much on my wish list!