Click to See Complete Forum and Search --> : slight delay on background image loading


mantraslider
06-30-2005, 10:09 AM
Hi everyone.
I've done a search, but can't quite seem to find the info i need.

I'm using this random image javascript:

/*Random Background Image-
By JavaScript Kit (www.javascriptkit.com)
More free JavaScripts here!
*/

var backgr1="1.jpg"
var backgr2="2.jpg"
var backgr3="3.jpg"

var cur=Math.round(6*Math.random())
if (cur<=1)
backgr=backgr1
else if (cur<=4)
backgr=backgr2
else
backgr=backgr3
document.write('<body background="'+backgr+'" bgcolor="#FFFFFF">')
</script>

Is there a way to add a slight delay to the background image loading? I'm embedding a flash movie in my web page and want that to be the very first thing that is viewed, but the background image is just a little quicker at loading.

Can anyone help?

Khalid Ali
06-30-2005, 11:52 AM
wrong forum...please post your question in JavaScript section..and if you at least try to read the title of the forum, it will help u in future to post a question in the rigth forum hence increasing ur chances of getting a response faster.

mantraslider
06-30-2005, 11:54 AM
my sincere apologies!