A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Ho do I preload a gif animation or...

  1. #1
    Confused With Life
    Join Date
    Mar 2002
    Location
    UK
    Posts
    348

    Ho do I preload a gif animation or...

    This is not for flash but i'm having trouble getting information on this precedure.

    I have a gif animation at the top of my webpage which is part of my heading. I want it to appear smooth after the page has loaded not all jerky as the page is loading.

    So how do make the gif appear last, after everything has loaded.
    Preload if you like.
    Ive tried some jave but the example i got didnt work.

    Thanks for any help.

    Danny

  2. #2
    Allan Jardine
    Join Date
    Dec 2000
    Location
    Turtle hunting
    Posts
    192
    Hi try a little javascript like this:

    <script language="javascript">
    <!--
    var myimages=new Array()
    function preloadimages(){
    for (i=0;i<preloadimages.arguments.length;i++){
    myimages[i]=new Image()
    myimages[i].src=preloadimages.arguments[i]
    }
    }
    preloadimages("test.gpf"); //make array longer if you want more images preloaded
    //--></script>

    <body onload="preloadimages()">

    Hope that helps
    Ally..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center