Forum Moderators: not2easy
If i have an animated gif that doesn't loop but that i want to play on a mouse over, the problem's that it play right after it preloaded so when i mouse over the button, all i see is the last frame of the anim.
And i don't want to load the gif on mouse over, it has to be preloaded.
So big challenge ?
I don't think you can do it with JavaScript and a GIF, as the animation is started by the browser internally as soon as it detects that the loaded GIF is animated.
You'd have to use a Java applet, and even then you probably could not use a GIF, but would have to do an on-the-fly PAINT of the screen on mouseover, with the data file already preloaded with the Java applet, with all the bitmap (pixel) info in that data file for the new image. That's the only way I can think of to avoid loading the image on mouseover.
The actual PAINT in the Java applet would be fast enough, but the overhead for getting the applet downloaded and set up in the first place would be intolerable.
JavaScript is not able to access the screen effectively on a pixel level. You need a Java applet for that.
I think Everyman has spot the problem... it's a Browser restriction and no script will fix that.
I'll just find another way to get the thing running well.
Thanks for your help guyz !
havanice day.
Because it was something that had to be put on many website, i couldn't use flash and fake transparency by copying the background.
There was just too many.
So i just didn't preload the gif because anyway it wasn't very big (5k).
The biggest challenge I found was that MSIE plays animations at different speeds from Netscape.