I am desinging my new site and I really would like to have my backgroudn images change in flsadh every time the user refreshes the page. A great example is nike’s site.
http://www.nike.com/usa/index.html
Any 1 have a clue? Cuz I dont
Thanks
I am desinging my new site and I really would like to have my backgroudn images change in flsadh every time the user refreshes the page. A great example is nike’s site.
http://www.nike.com/usa/index.html
Any 1 have a clue? Cuz I dont
Thanks
you could have the .jpg’s in an array…
var imgs = ["image1.jpg", "image2.jpg", "etc", "etc"];
someMovieClip.loadMovie(imgs[Math.floor(Math.random()*imgs.length)]);
there’s a tutorial here at kirupa!! i didn’t know that. =)
thanks guys, i love this forum someone is always so willing to help:)
yeah… i love it too. :love:
omg TobyDog that tut was great. I recommend it to every1. and it was really really simple. i cant believe its that easy…
I just checked that tute, and it’s slightly wrong.
there’s a line somewhere that says
[AS] choice = math.round(math.random()*5)[/AS]
that should be changed to:
[AS] choice = math.floor(math.random()*6)[/AS]
Senocular says why here.