Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Data Integration / February 2007



Tip: Looking for answers? Try searching our database.

Random images

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
thahip - 22 Feb 2007 15:12 GMT
Hi,

I am loading images into flash from a mysql database using php, can you code it so that a random image is selected from a table when you press a button in flash?

thanks

Gavin
MotionMaker - 23 Feb 2007 12:34 GMT
You can have Flash do it or a PHP script do the random selection.

For Flash to do it, you need to initially provide all the image url values to
Flash, store them in an array and use the code example at
http://livedocs.macromedia.com/flash/8/main/00002382.html to select between 0
and the Array.length-1 value.

For PHP to do it, Flash simply requests a PHP script that uses PHP random
functionality such as http://us2.php.net/srand to return the image URL.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.