View Full Version : Random picture
Spiff
02-28-2004, 08:36 AM
Instead of static, I'd like to have a random picture @ http://www.tnd2004.com/MAIN.htm. I'd like to be able 2 do it only with html, but also from a swf file that gets the file randomly from a set of pictures outside.
divarch
02-28-2004, 11:01 AM
One of the options would be:
myImages = ['image1', 'image2', 'image3', 'image4'];
function extractImage(array) {
image = Math.round(Math.random()*(array.length-1));
}
extractImage(myImages);
trace(image);
Welcome
Spiff
02-28-2004, 11:58 AM
Tks 4 the help! Yet, if u could b more precise it would help since I'm just a beginner... That's php, right? Where do I insert it, how do I relate it to my html doc?...
Many tks. :)
divarch
02-28-2004, 12:07 PM
No, that's not PHP those are the tags only. I thought U need AS help, and this is AS code to be inserted Flash.
Sorry if I misunderstood
Spiff
02-28-2004, 12:11 PM
ok ok... It will also be very usefull, but I'd also like to know how 2 do it just with html...
Many tks.
divarch
02-28-2004, 12:18 PM
OK, will do but I am scanning some photos now, so I am a bit busy.
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.