I am making my first foray into online experiments by creating a body image method of limits task. I usually code direct in python, but for this, i’m using Builder as I dont know JS. My post is a combination of querying the best approach, and troubleshooting a slider issue.
The approach question
So, I have 150 png images of a body varying in adiposity. When moved through, it creates a smooth sequence from emaciated to obese.
I want participants to use a Slider to move through this sequence of images. For example, in Each Frame:
imgName = 'stimuli/' + str(slider.getRating()) + '.png'
Then, my img will be set by $imgName in Builder.
However, does this create a performance hit as it is having to set an image every frame? - it certainly seems to.
Do I have the right approach here? Or, is there a more efficient way to do this? To be honest i’m not overly concerned on the timing of this task as i’m not collecting RT, but with it eventually needing to go online, I don’t want it to be sluggish for users.
I want the slider to start at the beginning, or the end of the scale depending on the trial (set via a conditions.xlsx file). However, when I test this I can’t get the slider marker to draw until the participant interacts with it. A knock on effect is that the
getRating() which sets the img, does not work as intended.
I have tried the following in the begin routine, and I see the marker flash up for a frame and disappear until you interact with it.
if markerStart == 1: print('1') slider.markerPos = 149 else: print('2') slider.markerPos = 0
Do I need to invoke a draw method on this to get it to show when the trial starts, or is the slider marker rendering limited to when they interact with it?
Many thanks in advance.