dzung
5
For converting values from 0 to 255 to 0 to 1, you can reference this post:
This post might help with the Red
attribute not found issue:
It might just be that you need to use !== instead of != for the comparison. Were there any errors that were shown in the console?