Flash Question
- Started
- Last post
- 6 Responses
- NegativeSpace
i am looking to build a photogallery in flash that loads the thumbs and stuff from an XML document, but i also want everything to be dynamic so the client can log on to an admin panel and add or remove a photo.
So I plan to use php and mysql for that part.
My question is if i have php loop in an xml fiile that adds a tag for each image record in the database, will flash get this info when it tried to load the xml file?
Sorry if this isn't clear, I can try to explain in more detail what i mean if it is now. Thanks!
- rabattski0
as far as i understand you have to generate the entire xml first before you let flash load it. since you are already planning on working with php and mysql you can as well bypass xml and work with php directly.
- NegativeSpace0
hmm i planned to use xml because i had found some good tutorials for an xml photo gallery, and i am familiar with some basic php and mysql stuff.
But yeah thats what i was wondering if the entire xml had to be generated first or if it would do it on the fly.
In this case, is there any recommended resources for dealing with php and flash intergration?
In particular a dynamic photo gallery if anyone has come across it.
Code scares me ;(
Thanks!
- rabattski0
i'm not an xml expert but coding wise i would say you need a complete xml first. if you're going to create a backend tool you might as well generate it from there when the user is finished so that should solve that issue.
thumbnail wise you either have to upload the thumbnail seperately from the images or use e.g. GD to generate thumbnails from the uploaded images.
i've basically build exactly the same thing incl. backend tool but without using xml. i just load variables from a php script which gets the data from the mysql database. it's not that difficult though but either way you need to be code savvy though.
- Seph0
The PHPObject from http://www.ghostwire.com/
is handy, especially if you are a beginner to this level of complexity.Find an updatable gallery that works in PHP and then invoke the functions of from flash or somink like that....you work it out, ther might even be an example of what you want to do on the site.
- unfittoprint0
I once made a php file that would read a certain directory, retrieving the path of jpegs and outputing that info as an xml file. You don't even have to worry about updating your xml with new nodes...
- dilated0
the following code will generate xml automatically....
';
while ($row = mysql_fetch_assoc ($qr)) {
$r_string .= '';
while (list ($key, $val) = each ($row)) {
$r_string .= '' . $val . '';
}
$r_string .= '';
}
$r_string .= '';
echo $r_string;?>
so with a table images(id, imagename)
it will generate xml like as follows...