Images getting wiped sometimes [RESOLVED]
Ok, so, I have a new applet I'm working on and have encountered a bit of a problem.
I've developed it up to the point where I have a library of images that are rendered every quarter of a second or less. This works perfectly.
However, it only works like this:
If I use IE, I have to: Load IE, go to the applet, let it load, then use it. It works fine. If I refresh, it no longer renders the images, and tells me that their width is -1. If I use the console to clear the classloader cache then refresh the applet, the images display fine again.
If I use FF, I have to: Load FF and go straight to the applet. No amount of refreshing or clearing the cache allows the images to display again.
I currently use a loop on Init that adds all the images to my library array, then checks to see if their width is >= 0. If it is, the image is "loaded". Otherwise, it shows the loading bar, which sticks at a random percentage when using Firefox.
How can I fix this so that it loads the images every time?
Hope I explained this clearly enough. If anything is unclear please ask!
Thanks in advance.