Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Aug 2002
    Location
    UK
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    temp internet files directory (image) recall query

    in the program im writing i use alot of images which i pre load into
    an image array. (mostly for animated buttons)

    when i run the page (uploaded on angelfire) it slowly downloads
    them (expected)

    when the page sometimes downloads it gets stuck and needs to
    be refreshed to get it going again.

    when i first download it, it takes about 2min35 to download them

    all. if i refresh then about 220 and closing and reopening the
    page in another window about the same. now if i press GO
    it continues from where it left off re using the stored images.

    i went to another page (www.ntlworld.com) and tested to see
    how it operated. the first time i downloaded it, it took quite a
    while. then i refereshed it and it took only a few seconds to
    download and didnt need to reload the images. and the same
    went for closing and opening up a new window and for GO too

    so mine is obvioulsy not behaving like that and i dont know why.



    my html images are address as

    src="images/buttons/up/5_up.gif"

    and my image array ones as

    startbuttonup.src = "images/startup.gif"

    if i added http:// etc would this rectify it or would it make no
    difference?

    is there something else im missing which sorts this out?

    i would appreciate any help

    cheers

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    41 8' 52" N -95 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Make sure you put the script that preloads the images in the <head> section (I'm assuming you're preloading the images). If not, there are examples of exactly how to do this on http://www.javascriptkit.com !
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)

  • #3
    New to the CF scene
    Join Date
    Aug 2002
    Location
    UK
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question pre loading images

    Well i assume i am pre loading the images correctly
    (the way i was told in a book)

    images = new Array(25);

    for (i=0; i<15; i++)
    {
    images[columns] = new Array(3);

  • #4
    New to the CF scene
    Join Date
    Aug 2002
    Location
    UK
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question pre loading images

    Well i assume i am pre loading the images correctly
    (the way i was told in a book)

    images = new Array(5);

    for (i=0; i<5; i++)
    {
    images[i] = new image();
    images[i].src = 'blahblah' + i + '.gif'
    }

    though in the link you gave me it does it as

    var theimages=document.images
    for (i=0;i<theimages.length;i++)
    theimages[i].src="blank.gif"

    is the document.images part something different and act in
    a different way? i cant tell?

    thanks for the help

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    41 8' 52" N -95 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Nah, it's just going through a loop and adding the images to an array, same as your code. Can you post the URL where you are having probs?
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)


  •  

    Posting Permissions

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