OZONE Asylum
Forums
Multimedia/Animation
Need some flash advice!!
This page's ID:
24503
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
Flash and PHP get along quite agreeably. You might have a PHP script handle the back and forth. Both the LoadVars and XML objects have sendAndLoad methods. You could send a variable or an XML packet to the PHP script which would negotiate with the database. Whatever object you specify as the target of what comes back would "catch" the response. This is off the top of my head, so it probably wo't work exactly this way, but it gives you an idea of how it works. Let's say you want to send your score to the database, and get back your ranking based on that score. You write a PHP script you call "bridge.php" because it's a bridge between your movie and the database. It's a sort of proxy. In ActionScript 2 you might write [code]var senderObj:LoadVars = new LoadVars(); var receiverObj:LoadVars = new LoadVars(); senderObj.score = 100; senderObj.sendAndLoad("bridge.php", receiverObj, "GET");[/code] So senderObj sends its "score" variable to bridge.php via the GET protocol, and targets receiverObj as the target of what comes back. What happens in bridge.php is up to you, but that's one strategy for getting data to and from a database with ActionScript. If you are using ActionScript 1 it would be the same, just without the ":LoadVars" bit. And if you expect to get data back formatted in XML, make the receiverObj a new XML object. Works great.
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »