Difference between revisions of "Back to the first frame"
Jump to navigation
Jump to search
(Created page with "<syntaxhighlight lang="java" line='line'> if (vals[0]>40){ imgInSeq= (imgInSeq+1) % numImages; }else{ imgInSeq=1; } </syntaxhighlight> and after each sound trigger, if...") |
(No difference)
|
Revision as of 18:13, 18 April 2021
1if (vals[0]>40){
2imgInSeq= (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:
1if (vals[0]>40){
2imgInSeq= (imgInSeq+1) % numImages;
3}else{
4 if(imgInSeq>5 && imgInSeq<97){
5 imgInSeq= (imgInSeq+1) % numImages;
6}else{
7 imgInSeq=1;
8 }
9}