Dynadot โ€” .com Registration $8.99

Random Banner for each visit

Spacemail by SpaceshipSpacemail by Spaceship
Watch
Flash has never been so interactive. In this tutorial i will be showing you how to load up a random swf each visit. So lets start!

1- rename all your desired movies into banner(number).swf eg banner1.swf,banner1.swf they have to consiguative numbers starting at 1
2- Load up flash
3- go to windows>actions


Enter the following:
PHP:
itemtotal = 2; //total banners that are going to be viewed randomly
fscommand("flashpath");
temptotal = itemtotal;
movieprefix = "banner";//as for the file name set previosly
aItemTemp = new Array(); //set a new arrey
aMovie = new Array(); //set another new arrey
newvar = math.round((math.random()*1)+1); // the alotherigom to work out the number which is going to be viewed.
loadMovieNum(movieprefix+(newvar)+".swf", 1); //loads the movie
test the movie by clicking control+ enter again and again(that will refresh it)
Tell me,how easy was that!
If you encounter any problems please do not hesitat to contact me. :)
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
Dynadot โ€” .com Registration $8.99Dynadot โ€” .com Registration $8.99
Unstoppable Domains
Domain Recover
DomainEasy โ€” Payment Flexibility
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back