I defined my event as ToggleRed and got it to work with the proximity sensor.
I added this toggle keypress:
vizact.onkeydown('m',ToggleRed)
However, I'm unable to toggle it off after toggling it on (i.e. it starts off as off, I press 'm' to toggle it on, but then pressing 'm' again doesn't toggle it off).
What am I missing to be able to toggle it both on and off?
Thanks!
|