Esato Mobile
General discussions : Non mobile discussion : HTML/javascript webdesign question
> New Topic
> Reply
< Esato Forum Index > General discussions > Non mobile discussion > HTML/javascript webdesign question Bookmark topic
EastCoastStar Posts: > 500

heyy all...
i know the random image script and all for websites... but i have like 4 flash intros... and i want them to load randomly every time the page is loaded... can anyone help me with a code?
--
Posted: 2005-05-23 06:16:07
Edit : Quote

gardar Posts: > 500

you could just make them all to a one flash file, just let one flash animation be for couple of minutes, then let he next come and be for few minutes.

But for the best scripts search on www.hotscripts.com - I have found all the scripts I ever wanted there...
--
Posted: 2005-05-23 13:50:00
Edit : Quote

Cycovision Posts: > 500


<!-- Begin
var howMany = 3
var movie = new Array(howMany+1)
movie[0]="http://....../flash1.swf"
movie[1]="http://....../flash2.swf"
movie[2]="http://....../flash3.swf"
movie[3]="http://....../flash4.swf"
function rndnumber(){
var randscript = -1
while (randscript < 0 || randscript > howMany || isNaN(randscript)){
randscript = parseInt(Math.random()*(howMany+1))
}
return randscript
}
quo = rndnumber()
quox = movie[quo]
-->
</SCRIPT>

The above script (once you've edited it!) will choose a random flash file for you. Unfortunately, you can't just plant the resulting variable (quox, which returns the full url to the flash file) directly into your HTML. You'll have to start another javascript session and use the document.write function to write the whole <embed> bit.

--
Posted: 2005-05-23 15:52:55
Edit : Quote

EastCoastStar Posts: > 500

thanks for that!
and itll eb easy to edit it and add the other bit, i just didnt know that main part.
thanks for that, it helped me alot!
--
Posted: 2005-05-23 17:07:00
Edit : Quote

New Topic   Reply
Forum Index

Esato home