Hello,
I’m new to PsychoPy and am currently trying change the opacity of an image depending on the current slider position.
What have I tried so far?
lightbulb_slider.psyexp (10.5 KB)
I created a slider, and put two versions of two images (a lightbulb) at the same coordinates. Lightbulb off on top of lightbulb on. With a code component, I am trying to adjust the opacity of the lightbulb off depending on the position of the slider:
opac = aha_slider.getRating() or 0 # rating from 0 to 100
insight.opacity = opac/100 ‘’‘in theory, this is unnecessary, because this is under every_frame tab and within the GUI for the lightbulb off image the opacity is set to every_frame’’’
I can see the slider, the lightbulb on. The slider works, but the opacity of the lightbulb off does not change, no matter how much I move the slider.