You could use javascript and an animated
gif but why would you want to do that rather than use Flash?
Flash would seem to be the better option.
Have a look
HERE.
Click the middle option which will open a new window, click either of the two resolution options you see.
Another new window will open with a button in the middle which I think is similar to what you're thinking of.
If you activate it, you will then see how the designer has incorporated it into his navigation further into his site.