anyone have any idea who i can create a image viewer which can:
pick the URL for ONE randomly selected image from a MYSQL database,
then send this image into flash?
anyone got any ideas how to do this?
random image selector
Started by darkson01, Feb 20 2007 05:13 PM
5 replies to this topic
#1
Posted 20 February 2007 - 05:13 PM
#2
Posted 20 February 2007 - 05:43 PM
PHP.
Then of course with Flash you can pull it like so.
And customize as needed.
// Assuming your connection and such is already done here
$query = mysql_query("SELECT `image_url` FROM `images` ORDER BY RAND() LIMIT 1") or die(mysql_error());
$image = mysql_fetch_array($query);
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0">
<param name="movie" value="images.swf?img=<?php echo $image['image_url']; ?>">
<param name="quality" value="high">
<embed src="images.swf?img=<?php echo $image['image_url']; ?>" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>
</object>
Then of course with Flash you can pull it like so.
image = level0.img;
And customize as needed.
#3
Posted 20 February 2007 - 06:17 PM
Dont you need _level0?
#4
Posted 20 February 2007 - 07:15 PM
Ya, I forgot about the underscore and didn't feel like opening up Flash to make sure.
#5
Posted 21 February 2007 - 10:56 AM
only problem with that is that the swf is being loaded into another movie so that code won't work.
anyone know how to do it through XML?
anyone know how to do it through XML?
#6
Posted 21 February 2007 - 01:25 PM
Use your php to write an xml doc and have flash load it up, or have flash echo a string and use loadvars to grab it in flash.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
