I have to disagree - it's not strange, it's expected. Based on your
example, you're NOT loading multiple images. You're loading one. I'd
suggest trying this method with an array of images, as when you
request one image, it's cached in memory, and you're no longer
requesting a new image, as it's loaded.

As well, generally for those purposes, I'd use the Asset.image or
Asset.Images to accomplish what you are trying.

-kb

On Nov 20, 5:56 am, woomla <woo...@gmail.com> wrote:
> I have a function that creates an image with new Image. Then I addEvent
> ('load', imageLoaded), then I set the image.src. When the image is
> loaded the event fires and in imageLoaded I show the image in the
> html.
>
> Timer based I call this function every second. Only the very first
> image triggers the event. Subsequent images do not trigger and thus
> are never displayed.
>
> If I set image.onload then that function is called every time.
>
> For some reason image.addEvent only works one time. Very strange isn't
> it?
>
> I've setup an example athttp://mooshell.net/MhvQj
> Run and then click 'start'. You'll see that the received counter that
> is increased on imageLoaded only get to 1. The loads counter that is
> increased in the onload handler, grows for every time an image is
> received.
>
> W.,

Reply via email to