Flash + XML or PHP?
- Started
- Last post
- 24 Responses
- suffix
alright i was thinking about getting into some type fo backend stuff, with flash intergration... what will be the best XML or PHP and what are some GOOD books on this topic?
- JazX0
- suffix0
nice.. thanks... anyone else?
- JazX0
PS, that book should help you, I mean with PHP, you really needn't right any of the code it's already all out there, therefore, you just orient it correctly and make it correspond with Actionscript, etc. With XML it's more of a socket thing I think? I know a bit of XSL.
- unformatted0
use both.
xml as your database then php to query your data.
if you just use xml, you can't right to the xml w/o a server side scripting.
- suffix0
i'll check out that book... it looks like it covers the stuff i want to know...
Unformatted, what about just using PHP? what would be a downfall of just using PHP and not XML and PHP... and do you have a good lead to a XML and flash book?
- JazX0
you can just use PHP as well, it's basically what you see in E-mail Flash Forms. Know what I mean? If you want a basic cover go to http://www.flashkit.com and search for "PHP Mailer" in their .fla search area. ;)
- suffix0
is there any big differences with flash 5 vs. flash MX with the database intergration? at least pertaining to XML and PHP?
- unformatted0
what would you use the php for then? unless you are using it with mySql.
as long as you use php with xml/mySql you'd be set.
i don't have a book, but this link helped alot
- suffix0
nice thanks!
- JazX0
not sure about all that XML stuff, I just know what I've learned with the basic PHP files being uploaded to your server and using them accordingly with Actionscript. ;)
- unformatted0
and i'm just learning the php stuff... ;)
guess it depends what you are using it for.
- JazX0
sure
- kinetic0
MX is better at handling dynamic data.
they have a load Vars object now, which really comes in handy.
and they also have the wonderful loadVars.sendAndLoad which reeeeally comes in handy
- suffix0
So Kinetic, are there any recent Flash MX books that cover teh usage fo these new functions? or should i be okay going though this old PHP and Flash book from 2001 and then implimenting the new functions later on?
- JazX0
http://www.onclipevent.com/radio… this site is pretty good at explaining XML with Flash in fact that link just cleared something up for me and you bringing up this topic helped me realize something as well. ;)
- JazX0
- enobrev0
some good suggestions here...
you can use xml regardless of using php or not, xml is probably the easiest way to access large portions of data, where the loadvars function would get a lil hairy.
You can use php to dynamically generate that xml (or asp, cf, [insert preffered scripting language here]).
There is also xml_sockets as mentioned earlier, but that's more for setting up socket server for use with chat apps and multiplayer games.
- kpl0
quick explaination of terms cos people seem to be confusing stuff here...
php is a scripting language.
xml is a markup language.
sql is a database language.none of them can work in place of another, they usually work together in some way. it's not xml or php, it's both.
ie, flash sends a request to a script written in php. the script passes it along to a database using sql. the database sends back the info to the php script with sql, and passes that info along to the flash using xml.
- enobrev0
and to clarify a step further...
xml is a means of transporting data. It's not really meant to be a means of storing data, as it has too much overhead, ("too wordy") to store data efficiently.
It's a standard that allows developers to write to one specific format and expect everyone else to understand how to read and write in the same format.
And thankfully, macromedia was nice enough to include the tools into flash's framework, as did the php gods.
As far as data storage, you have apps like mysql, ms sql, etc, which efficeiently store data and allow you to go in and grab what you need VERY quickly. So you grab the data (with sql as kpl mentioned), format it into xml form, then point flash to that generated flash file.
flash, having the xml parser built in, knows exactly how to read the file and gives you an ugly array filled with your variables.
... hmm.. the things you'll write about when trying really hard not to do any work....
- suffix0
awsome, thanks for the break down! it seems that the concept fo waht each do can be really fuzzy at times.... so thanks for that... and that Flash and XML studiolab book is pretty bad i heard... but thanks for the lead anyways.... Thanks for all your help guys! i think i'm gonna get that PHP fondation book and run with that and then move on as nessary