Flipflop

This script alternately 'flips' and 'flops' between two images, with adjustable smoothness, speed and pauses. It may be useful as an alternative to a crossfade.




Over 2000+ free Javascript
at JavaScriptBank.com Website

Sampled by JavaScriptBank.com

It is important that:

  1. The two images are square and of the same size, and
  2. The difference between wdmax (maximum width of square image) and wdmin (minimum thickness edge-on image) is an exact multiple of inc (the step change); otherwise the image will flip once and disappear.

If only requiring movement in one direction, set the "ff" variable to it, and delete or change the subsequent resetting of this variable accordingly.