Flash -> PHP -> XML
- Started
- Last post
- 25 Responses
- JazX0
your in school?
- unfittoprint0
that depends of the project. But more & more, I use XML or PHP to populate content within Flash...
AS 2.0 is becoming very similar to server side script syntax in the way it deals with classes, objects, etc... The next step maybe connecting it directly with a database, ie. MySQL.
- unfittoprint0
believe man, that's 2x times the trouble, 2x times the code...
but if you want to do it, I would advise you to test the php alone, to see if it prints the XML correctly. It may have to do with the XML encoding. If it has strange characters you'll have to change its encoding to utf-8.
good luck...
- instantok0
the php is fine...its just loading the variables that isnt working...
- mr_flaco0
Same here...
actually curious if you are doing more of your data reformatting inside or outside of Flash. I'm pretty much doing all of my data formatting in Flash before I push it out to php or asp, just wondering if others were doing the same...I dont get to work with other Flash developers often, so...
- rson0
What is the advan. of using ASP verse PHP. If any
- unfittoprint0
PHP is open source [& free]. ASP isn't.
Open Source all the way.
- instantok0
SUCCESS!!!
im an idiot...just a few easy things i overlooked in my 'oh my god i hope i can get this to work so that i can graduate this year' sort of flusteriness...
- JazX0
this has been brought up a few times. Use the DB, it might help you. You can use Dreamweaver to write XML. Basically a Flash -> PHP -> MySQL (whatever DB) -> PHP -> XML -> Flash deal is it?
- sparker0
flash can handle xml natively. you can create/modify without the need of a middleware component if you like.
now, if you want the use of an rdbms like mysql or postgre, then you will need something in the middle, php/perl/asp...etc.
- instantok0
k...i found something...
http://www.kirupa.com/developer/…
im using php to pull an existing xml file and edit specific nodes...would this be possible / easier handling the XML with Flash alone?
- mr_flaco0
Ok wait, have I been doing twice the coding? Can I write xml back to a file directly from Flash?
- nNine0
hi unfit... can you help me find in Portugal a php manual..i've tryed everywhere fnac, Bertrand and still nothing...
- JazX0
yep, go with PHP
- unfittoprint0
I may misunderstood something. I though he was parsing the XML using PHP and then loading the retrieved variables into Flaseh...
To write something within the server you'll have to use PHP [or ASP]...
my bad.
- phirschybar0
Yeah... why wont Macromedia let us hook flash up to MySQL directly? Seems like a good move for them.
- JazX0
kirupa is a good resource, some quality files there
- JazX0
yeah you might just skip out on the PHP itself
- mr_flaco0
ok, thank god I hadnt missed that...
hey I'm curious, unfit, do you do more string manipulation with AS or server side?
- instantok0
yeah...usually pretty good...i cant seem to get this one to work tho...i copied and pasted everything (and yeah i remembered to change the url to my php file)...kinda pissing me off...gahhh just this one thing to figure out and my senior project is fully programmed...