Flash & XML Image Rotator

Nothxkbi

Banned
Joined
Mar 19, 2010
Messages
4,529
Reaction score
3
Location
Amanzimtoti - KZN
Ok here's an example of what I'm trying to do. The logic is pretty straightforward in setting up the flash file and linking the xml document as its source.

The idea is that users will upload images, the image saved to a folder and a link is created in an sql datatabase. Easy.

Now how to programatically change the xml page to reflect that? Is it possible or is there an easier way?

http://www.republicofcode.com/tutorials/flash/slideshow/2.php

This is the part in the xml I want to be able to dynamically change/build as soon as an image is uploaded:

Code:
<slideshow width="400" height="400" speed="2">
<image url="images/image1.jpg" title="Market Walk" />
<image url="images/image2.jpg" title="History" />
<image url="images/image3.jpg" title="Ying Yang" />
<image url="images/image4.jpg" title="Kid Youth" />
<image url="images/image5.jpg" title="Heart of Spice" />
<image url="images/image6.jpg" title="Elissa" />
<image url="images/image7.jpg" title="Silver Secret" />
<image url="images/image8.jpg" title="Endless Mountains" />
<image url="images/image9.jpg" title="Light of Hope" />
<image url="images/image10.jpg" title="Bored?" />
</slideshow>
 
Last edited:
why are you not doing this with a jquery plugin?
do you have some kind of special transition effects?
 
if you have to do flash, it's much easier doing it with json/sendAndLoad() etc.
just make a call to a server script and echo back an array from the db.
static xml is more for config files and systems which don't have a cms.
 
lol. fill in the DB details. may have to change the query (SELECT * FROM... )... save this on your webserver as xmlgen.php... and point your flash app to this url for the xml.

<?

$db = mysql_connect('YOUR_DB_ADDRESS','YOUR_DB_USER','YOUR_DB_PASS') or die("Database error");
mysql_select_db('YOUR_DB', $db);

$query = "select * from YOUR_DB_TABLE";
$result = mysql_query($query);

echo '<slideshow width="400" height="400" speed="2">';

while($row = mysql_fetch_assoc($result)){ echo '<image url="'.$row['filename'].'" title="'.$row['title'].'" />'; }

echo '</slideshow>';






?>
 
Last edited:
Thanks guys. I found a super jquery example here http://galleria.aino.se/

The classic-04.html is such a lovely example, head developer loves it too so gonna go with that.

http://github.com/aino/galleria/tree/master/demos/

Gonna and tinker and chew over this for the day, will let you know what I come up with.

Thanks for the super jquery example. I'm curious what you come up with. I'd like to figure out some why to integrate it into the daycare supplies site I've been working on. Even just as an experiment.
 
Top
Sign up to the MyBroadband newsletter
X