Millisecond Forums

Nonlinear sequence

https://forums.millisecond.com/Topic29667.aspx

By troyh - 9/5/2020

Hello,

Is it possible to create a block of text, in which there are multiple option words to click on that take you to another block of text? Like hyperlinks that connect two separate text stimuli?
By Dave - 9/7/2020

troyh - 9/5/2020
Hello,

Is it possible to create a block of text, in which there are multiple option words to click on that take you to another block of text? Like hyperlinks that connect two separate text stimuli?

You can build something like this:

<defaults>
/ canvasaspectratio = (4,3)
/ inputdevice = mouse
</defaults>

<block myblock>
/ trials = [1=mytrial]
</block>

<text blocktext>
/ items = ("Click <b><u>here</u></b> or <b><u>here instead</u></b>.")
/ size = (80%, 85%)
/ fontstyle = ("Arial", 3%)
/ txcolor = black
/ hjustify = left
/ vjustify = center
</text>

<shape link1>
/ shape = rectangle
/ size = (5%, 3%)
/ color = greenyellow
/ position = (18%, 50%)
</shape>

<shape link2>
/ shape = rectangle
/ size = (14%, 3%)
/ color = orange
/ position = (31%, 50%)
</shape>

<trial mytrial>
/ stimulusframes = [1=link1,link2,blocktext]
/ validresponse = (link1, link2)
/ branch = [
    if (trial.mytrial.response == "link1"){
        return trial.link1trial;
    } else if (trial.mytrial.response == "link2"){
        return trial.link2trial;
    }
]
</trial>

<trial link1trial>
/ stimulusframes = [1=target1, end]
/ validresponse = (end)
</trial>

<trial link2trial>
/ stimulusframes = [1=target2, end]
/ validresponse = (end)
</trial>

<text target1>
/ items = ("You clicked the 1st link.")
</text>

<text target2>
/ items = ("You clicked the 2nd link.")
</text>

<button end>
/ caption = "END"
/ position = (50%, 90%)
/ size = (20%, 5%)
</button>
By troyh - 9/8/2020

Dave - 9/7/2020
troyh - 9/5/2020
Hello,

Is it possible to create a block of text, in which there are multiple option words to click on that take you to another block of text? Like hyperlinks that connect two separate text stimuli?

You can build something like this:

<defaults>
/ canvasaspectratio = (4,3)
/ inputdevice = mouse
</defaults>

<block myblock>
/ trials = [1=mytrial]
</block>

<text blocktext>
/ items = ("Click <b><u>here</u></b> or <b><u>here instead</u></b>.")
/ size = (80%, 85%)
/ fontstyle = ("Arial", 3%)
/ txcolor = black
/ hjustify = left
/ vjustify = center
</text>

<shape link1>
/ shape = rectangle
/ size = (5%, 3%)
/ color = greenyellow
/ position = (18%, 50%)
</shape>

<shape link2>
/ shape = rectangle
/ size = (14%, 3%)
/ color = orange
/ position = (31%, 50%)
</shape>

<trial mytrial>
/ stimulusframes = [1=link1,link2,blocktext]
/ validresponse = (link1, link2)
/ branch = [
    if (trial.mytrial.response == "link1"){
        return trial.link1trial;
    } else if (trial.mytrial.response == "link2"){
        return trial.link2trial;
    }
]
</trial>

<trial link1trial>
/ stimulusframes = [1=target1, end]
/ validresponse = (end)
</trial>

<trial link2trial>
/ stimulusframes = [1=target2, end]
/ validresponse = (end)
</trial>

<text target1>
/ items = ("You clicked the 1st link.")
</text>

<text target2>
/ items = ("You clicked the 2nd link.")
</text>

<button end>
/ caption = "END"
/ position = (50%, 90%)
/ size = (20%, 5%)
</button>

Thanks a ton!!