Hello !
I've been tryiong to make a simple integer counter with the prime numbers being displayed in a specific color. I'm not a coder, and I had already some trouble discovering the syntax I need to do it. But' I'm afraid I've run into a more srieus trouble, because I can't find a way to incrmement my "i" variable wich is supposed to track the progress in the primes array.
Some help wpould be (obviously) greatly appreciated !
Denis van W.
vimeo.com/dvanw
Code: Select all
P = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149] ;
t = (time*25).toFixed(0);
if (t==0){
i=0 ;
}
if (t==P[i]){
i=i+1;
text.sourceText.createStyle().setFontSize(72).setFillColor([1,0,1]).setText(t);
}else{
text.sourceText.createStyle().setFontSize(72).setFillColor([1,1,1]).setText(t);
}