Providing graphical feedback for *online* 2AFC

Hi,

I’ve created a 2AFC experiment that provides visual feedback in the form of a rectangle that is drawn around the selected image after the subject has made their choice (left/right key press).

This builder view experiment uses 2 x imagestim objects (rectangles) whose Start time was set to “condition”.

(FYI I was unable to get a suggested solution to work adequately, which was to set the value of condition to $keyresp.keys == ‘left’ (or ‘right’) as whilst this does highlight the chosen picture, the code never proceeds beyond the first trial.)

I ended up having to use a code-block:

Begin Routine:

highlightL.tStart = 0
highlightR.tStart = 0

Each Frame:

if keyresp.keys == 'left':
    highlightL.setAutoDraw(True)
    highlightR.setAutoDraw(False)
elif keyresp.keys == 'right':
    highlightR.setAutoDraw(True)
    highlightL.setAutoDraw(False)

This works really nicely on the desktop, but I’d like to roll it out to an online experiment, and am wondering where to start? I know that code blocks are not supported, but on a whim I exported the experiment as html, uploaded to our server, just to see what happened.

Answer: not a lot. Blank screen, didn’t even see the subject/session gui dialogue.

Does having a code-block in a builder view set a flag that puts the kibosh on the outputted html/javascript?

Best wishes,

Jon