Only change 10 to any other number. % means "mod" - it calculates the rest
of the division. So if you want to show 8 images, write
if ( anynumber % 8 == 1 ) {do something}

"anynumber % 8 == 1" happens when "anynumber" is 9, 17, ...

same to 12 or any other modular event

>
>
> Thank you! What if I want to show 8 or 12 images?
>
> 2008/4/14, Kai Feldmaier <[EMAIL PROTECTED]>:
> > Use
> > if ( anynumber % 10 == 1 ) {do something}
> >
> > > Hi
> > > I build slideshow with 10 visible thumbnails. After each 10 pictures I
> > > move thumbnails to show next 10.
> > > Another words
> > > if  (id==11  || id==21 || id==31) {do something}
> > > How to write more wise if statement?
> > > Thanks
> > > _______________________________________________
> > > Flashcoders mailing list
> > > Flashcoders@chattyfig.figleaf.com
> > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > _______________________________________________
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to