Fmdpa Posted April 21, 2010 Share Posted April 21, 2010 How can I preload all of the images on a page while a gif is playing on a black BG, then when loading is complete, fade-in to the page? Link to comment Share on other sites More sharing options...
jeffman Posted April 22, 2010 Share Posted April 22, 2010 You preload images with the Image constructor:var myImage = new Image();myImage.src = "something.gif";This can also work conveniently with an array:var myImageArray = new Array();myImageArray[0] = new Image();// etc.Fade-ins are a little more complicated. CSS3 promises a consistent opacity property that can be controlled with different values, but many browsers have their own version of it. So usually it takes about three statements to set opacity and catch all the major browsers. http://www.google.com/search?q=css+opacity Link to comment Share on other sites More sharing options...
Fmdpa Posted April 23, 2010 Author Share Posted April 23, 2010 Thanks a lot Deirde's Dad! I don't need the fade-in, so this is what I really wanted. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.