don't know the syntax, but something like: if frame is even, on, frame odd, off so if frame/2 == int(frame/2), then on, else off