rotating images

Cubist at aol.com Cubist at aol.com
Fri Jul 29 14:54:07 EDT 2005


sez bann at sunncomm.com:
>One thing I want to add is make those images loop.  Example 1-2-3 then
>back to 1-2-3 and so on.  Right now it stops at 3
>
>Should I add "repeat with ........"
   Possible, but not necessary. If you want to have an index number cycle 
thru 1-2-3-1-2-3-1-2-3... forever, this does the trick:

  put (1 + (IndexNumber mod 3)) into IndexNumber

   Obviously, you'll have to change that "3" to a different number if you're 
cycling thru more or less than 3 images. And if there's a chance that the 
number of images will change, you should replace that "3" with a variable, like so:

  put (1 + (IndexNumber mod NumberOfImages)) into IndexNumber

   Hope this helps...



More information about the use-livecode mailing list