Hi all,
First of all, I want to thanks people in this forum. I made an experiment using slider with keyboard input and it worked fine for your enormous helps.
This time I tried to make a practice trial which include key instructions using text component in builder view. This sounds easy, but when I added an additional text component, the text fail to be appear on the screen.
My slider routine consists of the following components:
First, code_8 set random anchor as:
Current_anchor = randint(0,101)
code 9 for keyboard control over slider, at begin routine:
Slider_practicel.recordRating(Current_anchor)
and at each frame as codeJS:
arrowKeys = psychoJS.eventManager.getKeys({keyList:['left', 'right']});
if (arrowKeys.includes('left')) {
Slider_practicel.recordRating(Slider_practicel.getRating()-1);
}
if (arrowKeys.includes('right')) {
Slider_practicel.recordRating(Slider_practicel.getRating()+1);
}
code 12 is for preventing key press and instruction text.
at begin routine:
response_wait = False
text_instr = f'adjust slider using left and right arrow
, at Each Frame:
if 'left' in arrowKeys or 'right' in arrowKeys:
response_wait = True
text_def = f'Make a response by pressing arrow down.'
and my textStim is:
The problem as indicated above is that this text component does not appear on the screen with the slider. What prevents the textStim from being on the screen?
(Sld_img is an image at the center of the screen which changes with slider values and it seems nothing to do with this issue.)
Thank you