Looping between 0-7 numbers while swiping

Hi I am trying to loop between 0-7 even i swipe right or left like increase and decrease

I tried and got a solution which is giving output as i expected but i wanted to know is there any way to reduce or modify this

and this is text doc of code : [link text][3]

Something like this ( tested ):

309097-8.jpg

How can i modify the below with foreach loop

the below is complicated and need to duplicate if i add another integer

the above is not working correctly

Still the same output is coming I don’t understand where the issue is coming

Here is my project

link text

Yea I forgot to rename them while zipping

Your levels are actually called a, b and c. But in the level array you’ve called them offroad, snow and tour.

But it’s still not quite right, I’m looking…

EDIT:

309139-stream.gif