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.