It seems @ line # 51 -> background(b);
it is outside of any function scope.
AFAIK, it shoulda been the 1st thing inside function draw()!
P.S.: In these posts:
http://forum.processing.org/topic/deleted-forum-processing-org-topic-traffic-light-functions-help
http://forum.processing.org/topic/animation-erasing-and-keeping-method
There are some tricks there to turn a loaded image scaled to canvas dimensions in setup(),
then, ready to be used for background() within draw()!
That would be useful if you hadn't pre-scaled your background image outside Processing.
it is outside of any function scope.
AFAIK, it shoulda been the 1st thing inside function draw()!
P.S.: In these posts:
http://forum.processing.org/topic/deleted-forum-processing-org-topic-traffic-light-functions-help
http://forum.processing.org/topic/animation-erasing-and-keeping-method
There are some tricks there to turn a loaded image scaled to canvas dimensions in setup(),
then, ready to be used for background() within draw()!
That would be useful if you hadn't pre-scaled your background image outside Processing.