In the beta city save. Go to the train station. The events for the light switch use it.
That's how I learned it.
Or: Load demo house.
Basically toggle event enabled does as it's named, for example: if you wanted to build something that would shift colors you would make it something like:
[!]0 Onactivate self setcolor green
[!]1 onactivate self toggleeventenabled 0 1 2 3
[ ]2 onactivate self setcolor blue
[ ]3 onactivate self toggleeventenabled 2 3 4 5
[ ]4 onactivate self setcolor red
[ ]5 onactivate self toggleeventenabled 4 5 0 1
[!] is activated. when clicked it would set the color to green, then clicked again blue, then again red, then green again and keep cycling.