preloader for images and sound

hey... i'm new... is there anyone who can give me a preloader script?
i just made a web site and i'm planning to add a preloader to load
the images and sound on the 1st page of my web site... anybody can help? thanks... ^_^

Comments

  • : hey... i'm new... is there anyone who can give me a preloader script?
    : i just made a web site and i'm planning to add a preloader to load
    : the images and sound on the 1st page of my web site... anybody can help? thanks... ^_^
    :
    You can preload images for rollovers so it downloads all images at the start, is that what you want?

    image1=new Image;
    image1.src = 'http://your.url.com/filename.gif/.jpg';
    image2=new Image;
    ....
    ...
    function changepic() {
    window.document.images[0].src = image2.src;
    }

    image

  • : You can preload images for rollovers so it downloads all images at the start, is that what you want?
    :
    : image1=new Image;
    : image1.src = 'http://your.url.com/filename.gif/.jpg';
    : image2=new Image;
    : ....
    : ...
    : function changepic() {
    : window.document.images[0].src = image2.src;
    : }
    :
    : image
    :

    yeah... that's what i mean... 1 more question... is that script for preloading images only? how can we preload flash, swf, or maybe wav?
    thanks
  • I do not know about preloading flash files, but you can preload sounds. In your HTML document body enter:


    Then in your script to make the sound play put:
    sound1.play();
    Hope it helps.


  • okay... thanks a lot for the answers
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories