Back to the first frame

From Interaction Station Wiki
Jump to: navigation, search
  1. if (vals[0]>40){
  2. imgInSeq= (imgInSeq+1) % numImages;
  3. }else{
  4.   imgInSeq=1;
  5. }


and after each sound trigger, if you want processing to finish playing the entire sequence before go back to the first frame:

you can take a look at this:

  1. if (vals[0]>40){
  2. imgInSeq= (imgInSeq+1) % numImages;
  3. }else{
  4.   if(imgInSeq>5 && imgInSeq<97){
  5.   imgInSeq= (imgInSeq+1) % numImages;
  6. }else{
  7.   imgInSeq=1;
  8.   }
  9. }