Load Full Image Before Loading Next Image

Hi! I'm a newbie here. Right now, I'm doing a javascript application which is displaying live image from a link. My problem here is I'll use



where every 5 seconds, a new image will be loaded again but I do not want the image to be refresh until the current image will be displayed in full.
Does anyone know how to determine the full image is being loaded in full without going to load a new image?

Thanks in advance!

Jacky

Comments

  • : Hi! I'm a newbie here. Right now, I'm doing a javascript application which is displaying live image from a link. My problem here is I'll use
    :
    :
    :
    : where every 5 seconds, a new image will be loaded again but I do not want the image to be refresh until the current image will be displayed in full.
    : Does anyone know how to determine the full image is being loaded in full without going to load a new image?
    :
    : Thanks in advance!
    :
    : Jacky
    :
    Probably not the way you will want to go, but if you use a nested for loop, and load the image pixel by pixel, the processor won't have a chance to stop loading the image. When it is done, it will check to see if it has been 5 seconds. Just a thought
  • : : Hi! I'm a newbie here. Right now, I'm doing a javascript application which is displaying live image from a link. My problem here is I'll use
    : :
    : :
    : :
    : : where every 5 seconds, a new image will be loaded again but I do not want the image to be refresh until the current image will be displayed in full.
    : : Does anyone know how to determine the full image is being loaded in full without going to load a new image?
    : :
    : : Thanks in advance!
    : :
    : : Jacky
    : :
    : Probably not the way you will want to go, but if you use a nested for loop, and load the image pixel by pixel, the processor won't have a chance to stop loading the image. When it is done, it will check to see if it has been 5 seconds. Just a thought
    :

    What I need is something which can determine the end of loading one image before continue freshing the whole image again. Thanks for your thought :)
  • [b][red]This message was edited by NCS_One at 2005-10-6 17:59:11[/red][/b][hr]
    : : : Hi! I'm a newbie here. Right now, I'm doing a javascript application which is displaying live image from a link. My problem here is I'll use
    : : :
    : : :
    : : :
    : : : where every 5 seconds, a new image will be loaded again but I do not want the image to be refresh until the current image will be displayed in full.
    : : : Does anyone know how to determine the full image is being loaded in full without going to load a new image?
    : : :
    : : : Thanks in advance!
    : : :
    : : : Jacky
    : : :
    : : Probably not the way you will want to go, but if you use a nested for loop, and load the image pixel by pixel, the processor won't have a chance to stop loading the image. When it is done, it will check to see if it has been 5 seconds. Just a thought
    : :
    :
    : What I need is something which can determine the end of loading one image before continue freshing the whole image again. Thanks for your thought :)
    :

    Hi

    You can use the onreadystatechange event and see if the readyState property is complete, when the readyState is complete
    you load the next image or do what ever you want.

    Hope it helps.


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