Rotating Banner Adds

How do I create an fla that rotates banners made in flash (external flash animations) upon refresh on the browser?

you’d probably have to do that with javascript, and tell the browser to load a different swf each time…

loadMovieNum(“http://something”,0)
this says to replace _level0 which is the current swf, with a new movie, so

urlArray = [“http://…firstbanner.swf”,
“http://…secondbanner.swf”,
“http://…thirdbanner.swf”,…];

loadMovieNum( urlArray[Math.random(urlArray.length)],0);

this will replace the current movie with a random swf from the list.

Ok. So that replaces the last banner, but how do I go about replacing it randomly every time you refresh? Like… onLoad some random function picks some random URL from a list?

Thank you;

Nathalia

I actualy don’t really even understand how to use the random function in Flash. Could someone explain that function for me?

Thank you;

Nathalia

that should do it i think, because when you refresh it sould reload the movie with that code in it…
which would cause a new random number to be selected and a different movie to be loaded

random() = random number between 0 and 1
random()*100 =random number between 0 and 100
random()*n =random number between 0 and n
random()*100-50 =random number between -50 and 50

random(100) = random integer between 0 and 100 , you wont get 23.4 or anything like that
random(n) = random integer between 0 and n
random(myArray.length) = random number of a member of the array

myArray[random(myArray.length)] = a random entry from the array

thats some random basics

im 65 % sure everything i just told you is off by 1 but you can check