We are about to switch to a new forum software. Until then we have removed the registration on this forum.
What I wrote works only in the context of the big sketch above
in the switch paragraph the var stateBkg is evaluated and the backg / rect changed
Without the switch section it won't work....