What's the best way to call DB items into flash?
I got a couple books on amazon but they only detail flash animation and layers not actual DB interaction an i need it added to my game to save there n开发者_运维技巧ame and scores.
I build the Login + Register page and it saves the data but i cannot get it to call, how do i call the DB items and show them in flash cs4? I just need to know the basics so i can learn this part and start adding it, i followed a lot of online tuts but none seem to cover what i need i don't want it stored in a file locally i want it Saved/Called from my DB to avoid cheating and i can keep track of my members playing it as i have a site built just for it.
- How do i show a form items submitted in the next frame? (success-frame) I don't think $_POST['username'] will work lol.
- Can i set a session in flash? or how to log hem in to there account.
- How do i Print there name/score from my DB in flash game?
Any help would be great or if you know of a resource for the Flash>DB side of it but thanks for reading, Gregg
The cleanest way to achieve this is by setting up a remote service that flash can consume.
You can do this with AMFPHP: http://silexlabs.org/amfphp/ It is an open source library written in php that does just that.
Cheers
Your best option is to callout to a PHP file that will accept a parameter of 'username'. The PHP file will be a middle man of sorts to interact with your DB (MySql I presume) and return information (async) to your flash. Once you receive, then you can show whatever output you determined to return from the PHP interaction with the DB. Beware of security concerns for both flash and PHP.
精彩评论