We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › clock issue
Page Index Toggle Pages: 1
clock issue (Read 476 times)
clock issue
Apr 27th, 2010, 10:24pm
 
hi, i'm trying to create a clock that shows the seconds using words instead of letters. i plan on moving on with minutes and hours, but i can't seem to get it to work.
can someone please help?

the code is:



PFont fontA;
int s = second();

void setup()
{
size (500, 500);
background (0);
fontA = loadFont("HelveticaNeueLTCom-UltLt-100.vlw");
textFont (fontA, 100);
noLoop();
smooth();
}

void draw() {
 s = second();
 fill(255);
 
 if (s == 1) {
   text("one", width/2, height/2);
 }
     
   if (s == 2) {
   text("two", width/2, height/2); }

   
}


and so on.
yet nothing is happening. what can be the issue?

Re: clock issue
Reply #1 - Apr 27th, 2010, 10:46pm
 
Could it be that you call noLoop() in setup() so that draw() never runs?
Page Index Toggle Pages: 1