I have a gif which when 'rolled over' swaps with an animated gif. I want it to sit on the last frame of that animated gif, regardless of whether it is rolled over again or not.
In other words, I guess I only want the rollover to work once. Possible??? Thanks in advance.
you need to set boolean global variables, ie variables which exist outside of your functions!
In the head of your doc, or in an external file (this would be better), declare a variable for the rollover state and declare it to be false, e.g isAlreadyOver=false; .
In the function, have something like ...
function changeImg(imageName,newImg)
{
if (isAlreadyOver=false) {
do stuff ...
}
isAreadyOver = true
}
That way the next time the function is called it won't activate.
Bookmarks