Issue with code component during online pilot

I just tried that and it still did not display the text.

Hey Jonathan, would it just be easier to change the color of the clicked box instead? I’ve tried all of the suggestions posted here and haven’t gotten it to work yet.

At this point I would worry that it’s not registering the clicks correctly. Before you try that, I suggest adding a console.log call in your JS code:

if (F_box.contains(mouse)) {
        numClicks++;
        F_num.setText(String(numClicks));
        console.log("F box clicked");
    } else if (H_box.contains(mouse)) {

That will put a message in your browser’s JS console. That’s just a good way to verify that the clicks are being recognized before we start worrying too much about changing the behavior they trigger.

Hmmm I added in the console message for one of the boxes and nothing appeared. Do I need to specify the boxes as clickable stimuli in the mouse settings? I remember reading on one of your previous posts about this that it wasn’t necessary

Hey Jonathan, don’t know how helpful this is, but this is what the console output looked like when I added in the message and clicked the box.

I honestly have no idea. If I have time this weekend I’ll look at the experiment you shared and see what I can figure out.

Thank you. I really appreciate it!

Sorry for dropping the ball on this, I got swamped by some deadlines. Have you figured out a solution or are you still having trouble?