-
MindGem Graphics Inc.
Saving and retrieving variables from Flash<->Database
Hey,
Could someone point me to a tutorial for beginners on how to save/get variables stored on an external file/database into flash?
As I understand it I need to learn the basics of either MySQL or XML as the database language AND a side server script like PHP or ASP to speak with the database from Flash.
I can't belive Flash hasn't somehow figure this thing out and made it much much easier to save data.
Anyways, anyone have an URL for anything that discuss this?
-
The reason why flash cannot do that is because it is a client side application (The flash code is executed on the client computer) where as the database you use and the php you use to pull information out of it is executed on the server side. (The code is executed on the server computer).
Can you specifically explain what you are trying to accomplish so I can steer you in the right direction?
For instance to send and retrieve stuff from flash using the post method to a php script on your server, here's a basic tutorial:
http://rickydoesit.com/actionscript-...iables-to-php/
For the rest, just google "mysql php tutorial database access" or something like that. That will show you how to communicate with a database from PHP.
-
MindGem Graphics Inc.
Hi Beathoven.
I'll check out the links for sure but since you asked me to specify what I wanted I'll go ahead and do that, hoping for a code snippet from you.
So I have 1 variable in Flash.
var test:Number = 4;
When I click a button it'll increase the value by one
and send the value to a variable container on my database(preferly MySQL) via preferly(PHP)
So what is the simplest, shortest code snippet in PHP and XML/MySQL to pick that variable post up and get it back to flash on command?
-
Senior Member
Originally Posted by JediMind
Hi Beathoven.
I'll check out the links for sure but since you asked me to specify what I wanted I'll go ahead and do that, hoping for a code snippet from you.
So I have 1 variable in Flash.
var test:Number = 4;
When I click a button it'll increase the value by one
and send the value to a variable container on my database(preferly MySQL) via preferly(PHP)
So what is the simplest, shortest code snippet in PHP and XML/MySQL to pick that variable post up and get it back to flash on command?
It's a bit more complex but basically what you are asking for:
http://www.flashscript.biz/php/AS3_m...te_counter.php
- The right of the People to create Flash movies shall not be infringed. -
-
You should also check out amfphp.org. That makes things a lot easier if you use PHP.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|