Nonlinear sequence


Author
Message
troyh
troyh
Partner Member (564 reputation)Partner Member (564 reputation)Partner Member (564 reputation)Partner Member (564 reputation)Partner Member (564 reputation)Partner Member (564 reputation)Partner Member (564 reputation)Partner Member (564 reputation)Partner Member (564 reputation)
Group: Forum Members
Posts: 38, Visits: 190
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?
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
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>

troyh
troyh
Partner Member (564 reputation)Partner Member (564 reputation)Partner Member (564 reputation)Partner Member (564 reputation)Partner Member (564 reputation)Partner Member (564 reputation)Partner Member (564 reputation)Partner Member (564 reputation)Partner Member (564 reputation)
Group: Forum Members
Posts: 38, Visits: 190
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!!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search