dragdrop expt


dragdrop expt

Author
Message
scollin
scollin
Associate Member
Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)

Group: Forum Members
Posts: 8, Visits: 34
Hello,

I am trying to create on experiment during which participants will sort images. I want them to do this by dragging and dropping them into either the red or the blue rectangle. See code below. Even though I'm using dragdrop and dropsource and droptarget, it does not seem to work. Any advice on what is wrong?

Once this works I also want to save in which rectangle a participant has placed each image, I guess I should save this by saving the position on the screen?



<shape bluecircle>
/ shape = rectangle
/ color = (0, 0, 200)
/ position = (80%, 50%)
/ droptarget = true
/ size = (20%, 20%)
</shape>

<shape redcircle>
/ shape = rectangle
/ color = (200, 0, 0)
/ position = (20%, 50%)
/ droptarget = true
/ size = (20%, 20%)
</shape>

<picture egg1>
/ items = ("egg1.png")
/ position = (10%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg6>
/ items = ("egg6.png")
/ position = (20%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg9>
/ items = ("egg9.png")
/ position = (30%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg10>
/ items = ("egg10.png")
/ position = (40%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg18>
/ items = ("egg18.png")
/ position = (50%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg19>
/ items = ("egg19.png")
/ position = (60%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg21>
/ items = ("egg21.png")
/ position = (70%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg41>
/ items = ("egg41.png")
/ position = (80%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>



<text finishtext>
/ items = ("time almost up!")
/ txcolor = (0, 0, 255)
/ txbgcolor = (255, 255, 255)
/ size = (5%, 5%)
/ position = (0%, 0%)
</text>


<trial mytrial>
/ stimulustimes = [0=bluecircle; 0=redcircle; 0=egg1; 0=egg6; 0=egg9; 0=egg10; 0=egg18; 0=egg19; 0=egg21; 0=egg41; 10000 = finishtext]
/ showmousecursor = true
/ inputdevice = dragdrop
/ recorddata = true
/ response = anyresponse
/ responseinterrupt = trial
/ beginresponseframe = 0
</trial>

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

<expt>
/ blocks=[1=myblock]
</expt>



Dave
Dave
Supreme Being
Supreme Being (467K reputation)Supreme Being (467K reputation)Supreme Being (467K reputation)Supreme Being (467K reputation)Supreme Being (467K reputation)Supreme Being (467K reputation)Supreme Being (467K reputation)Supreme Being (467K reputation)Supreme Being (467K reputation)

Group: Administrators
Posts: 9K, Visits: 38K
scollin - Friday, August 24, 2018
Hello,

I am trying to create on experiment during which participants will sort images. I want them to do this by dragging and dropping them into either the red or the blue rectangle. See code below. Even though I'm using dragdrop and dropsource and droptarget, it does not seem to work. Any advice on what is wrong?

Once this works I also want to save in which rectangle a participant has placed each image, I guess I should save this by saving the position on the screen?



<shape bluecircle>
/ shape = rectangle
/ color = (0, 0, 200)
/ position = (80%, 50%)
/ droptarget = true
/ size = (20%, 20%)
</shape>

<shape redcircle>
/ shape = rectangle
/ color = (200, 0, 0)
/ position = (20%, 50%)
/ droptarget = true
/ size = (20%, 20%)
</shape>

<picture egg1>
/ items = ("egg1.png")
/ position = (10%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg6>
/ items = ("egg6.png")
/ position = (20%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg9>
/ items = ("egg9.png")
/ position = (30%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg10>
/ items = ("egg10.png")
/ position = (40%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg18>
/ items = ("egg18.png")
/ position = (50%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg19>
/ items = ("egg19.png")
/ position = (60%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg21>
/ items = ("egg21.png")
/ position = (70%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg41>
/ items = ("egg41.png")
/ position = (80%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>



<text finishtext>
/ items = ("time almost up!")
/ txcolor = (0, 0, 255)
/ txbgcolor = (255, 255, 255)
/ size = (5%, 5%)
/ position = (0%, 0%)
</text>


<trial mytrial>
/ stimulustimes = [0=bluecircle; 0=redcircle; 0=egg1; 0=egg6; 0=egg9; 0=egg10; 0=egg18; 0=egg19; 0=egg21; 0=egg41; 10000 = finishtext]
/ showmousecursor = true
/ inputdevice = dragdrop
/ recorddata = true
/ response = anyresponse
/ responseinterrupt = trial
/ beginresponseframe = 0
</trial>

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

<expt>
/ blocks=[1=myblock]
</expt>



This example

<instruct>
/ fontstyle = ("Arial", 2.8%, false, false, false, false, 5, 1) / txcolor = (white) / screencolor = black / wait = 1000 </instruct>

<page intro>
In the following task, you will be presented with negative words related to outcomes of smoking or with positive words you may experience if you quit smoking. You will also see an image of a cigarette, and the word 'me' on the page.
~n~nYour task is to:
~n* Drag the negative words away from you and towards the cigarette.
Drag the positive words towards the word 'me'.
~n~nPress the spacebar to begin.
</page>

<expt>
/ preinstructions = (intro)
/ blocks = [1=intervention]
/ postinstructions = (end)
</expt>

<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
/11 = "stroke"
/12 = "asthma"
/13 = "feel unwell"
/14 = "out of breath"
/15 = "trapped"
/16 = "premature death"
/17 = "pollution"
/18 = "illness"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
/11 = "breathe easily"
/12 = "independent"
/13 = "clean"
/14 = "energetic"
/15 = "feel good"
/16 = "wellbeing"
</item>

<item smoking>
/1 = "smoking1.jpg"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
</text>

<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ droptarget = true
</text>

<picture smoking>
/ items = smoking
/ position = (50%, 10%)
/ size = (15%, 15%)
/ erase = false
/ droptarget = true
</picture>

<trial positive>
/ ontrialbegin = [
    text.positive.hposition = 50%;
    text.positive.vposition = 50%;
]
/ stimulusframes = [1 = positive, me, smoking] / inputdevice = dragdrop / showmousecursor = true / validresponse = (me, smoking) / correctresponse = (me) </trial>

<trial negative>
/ ontrialbegin = [
    text.negative.hposition = 50%;
    text.negative.vposition = 50%;
]
/ stimulusframes = [1 = negative, me, smoking] / inputdevice = dragdrop / showmousecursor = true / validresponse = (me, smoking) / correctresponse = (smoking) </trial>

<block intervention>
/trials = [1-68 = replacenorepeat(positive,negative)]
</block>

<page end>
You have reached the end of the task.
^^Thank you! Continue to enjoy being a non-smoking (or smoking less)!
</page>

as well as this thread here https://www.millisecond.com/forums/Topic24644.aspx should be useful with respect to setting up drag & drop mechanics properly.

scollin
scollin
Associate Member
Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)

Group: Forum Members
Posts: 8, Visits: 34
Dave - Friday, August 24, 2018
scollin - Friday, August 24, 2018
Hello,

I am trying to create on experiment during which participants will sort images. I want them to do this by dragging and dropping them into either the red or the blue rectangle. See code below. Even though I'm using dragdrop and dropsource and droptarget, it does not seem to work. Any advice on what is wrong?

Once this works I also want to save in which rectangle a participant has placed each image, I guess I should save this by saving the position on the screen?



<shape bluecircle>
/ shape = rectangle
/ color = (0, 0, 200)
/ position = (80%, 50%)
/ droptarget = true
/ size = (20%, 20%)
</shape>

<shape redcircle>
/ shape = rectangle
/ color = (200, 0, 0)
/ position = (20%, 50%)
/ droptarget = true
/ size = (20%, 20%)
</shape>

<picture egg1>
/ items = ("egg1.png")
/ position = (10%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg6>
/ items = ("egg6.png")
/ position = (20%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg9>
/ items = ("egg9.png")
/ position = (30%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg10>
/ items = ("egg10.png")
/ position = (40%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg18>
/ items = ("egg18.png")
/ position = (50%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg19>
/ items = ("egg19.png")
/ position = (60%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg21>
/ items = ("egg21.png")
/ position = (70%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg41>
/ items = ("egg41.png")
/ position = (80%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>



<text finishtext>
/ items = ("time almost up!")
/ txcolor = (0, 0, 255)
/ txbgcolor = (255, 255, 255)
/ size = (5%, 5%)
/ position = (0%, 0%)
</text>


<trial mytrial>
/ stimulustimes = [0=bluecircle; 0=redcircle; 0=egg1; 0=egg6; 0=egg9; 0=egg10; 0=egg18; 0=egg19; 0=egg21; 0=egg41; 10000 = finishtext]
/ showmousecursor = true
/ inputdevice = dragdrop
/ recorddata = true
/ response = anyresponse
/ responseinterrupt = trial
/ beginresponseframe = 0
</trial>

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

<expt>
/ blocks=[1=myblock]
</expt>



This example

<instruct>
/ fontstyle = ("Arial", 2.8%, false, false, false, false, 5, 1) / txcolor = (white) / screencolor = black / wait = 1000 </instruct>

<page intro>
In the following task, you will be presented with negative words related to outcomes of smoking or with positive words you may experience if you quit smoking. You will also see an image of a cigarette, and the word 'me' on the page.
~n~nYour task is to:
~n* Drag the negative words away from you and towards the cigarette.
Drag the positive words towards the word 'me'.
~n~nPress the spacebar to begin.
</page>

<expt>
/ preinstructions = (intro)
/ blocks = [1=intervention]
/ postinstructions = (end)
</expt>

<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
/11 = "stroke"
/12 = "asthma"
/13 = "feel unwell"
/14 = "out of breath"
/15 = "trapped"
/16 = "premature death"
/17 = "pollution"
/18 = "illness"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
/11 = "breathe easily"
/12 = "independent"
/13 = "clean"
/14 = "energetic"
/15 = "feel good"
/16 = "wellbeing"
</item>

<item smoking>
/1 = "smoking1.jpg"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
</text>

<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ droptarget = true
</text>

<picture smoking>
/ items = smoking
/ position = (50%, 10%)
/ size = (15%, 15%)
/ erase = false
/ droptarget = true
</picture>

<trial positive>
/ ontrialbegin = [
    text.positive.hposition = 50%;
    text.positive.vposition = 50%;
]
/ stimulusframes = [1 = positive, me, smoking] / inputdevice = dragdrop / showmousecursor = true / validresponse = (me, smoking) / correctresponse = (me) </trial>

<trial negative>
/ ontrialbegin = [
    text.negative.hposition = 50%;
    text.negative.vposition = 50%;
]
/ stimulusframes = [1 = negative, me, smoking] / inputdevice = dragdrop / showmousecursor = true / validresponse = (me, smoking) / correctresponse = (smoking) </trial>

<block intervention>
/trials = [1-68 = replacenorepeat(positive,negative)]
</block>

<page end>
You have reached the end of the task.
^^Thank you! Continue to enjoy being a non-smoking (or smoking less)!
</page>

as well as this thread here https://www.millisecond.com/forums/Topic24644.aspx should be useful with respect to setting up drag & drop mechanics properly.

Thanks a lot!

scollin
scollin
Associate Member
Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)Associate Member (78 reputation)

Group: Forum Members
Posts: 8, Visits: 34
Dave - Friday, August 24, 2018
scollin - Friday, August 24, 2018
Hello,

I am trying to create on experiment during which participants will sort images. I want them to do this by dragging and dropping them into either the red or the blue rectangle. See code below. Even though I'm using dragdrop and dropsource and droptarget, it does not seem to work. Any advice on what is wrong?

Once this works I also want to save in which rectangle a participant has placed each image, I guess I should save this by saving the position on the screen?



<shape bluecircle>
/ shape = rectangle
/ color = (0, 0, 200)
/ position = (80%, 50%)
/ droptarget = true
/ size = (20%, 20%)
</shape>

<shape redcircle>
/ shape = rectangle
/ color = (200, 0, 0)
/ position = (20%, 50%)
/ droptarget = true
/ size = (20%, 20%)
</shape>

<picture egg1>
/ items = ("egg1.png")
/ position = (10%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg6>
/ items = ("egg6.png")
/ position = (20%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg9>
/ items = ("egg9.png")
/ position = (30%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg10>
/ items = ("egg10.png")
/ position = (40%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg18>
/ items = ("egg18.png")
/ position = (50%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg19>
/ items = ("egg19.png")
/ position = (60%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg21>
/ items = ("egg21.png")
/ position = (70%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>

<picture egg41>
/ items = ("egg41.png")
/ position = (80%, 10%)
/ dropsource = true
/ size = (5%, 5%)
</picture>



<text finishtext>
/ items = ("time almost up!")
/ txcolor = (0, 0, 255)
/ txbgcolor = (255, 255, 255)
/ size = (5%, 5%)
/ position = (0%, 0%)
</text>


<trial mytrial>
/ stimulustimes = [0=bluecircle; 0=redcircle; 0=egg1; 0=egg6; 0=egg9; 0=egg10; 0=egg18; 0=egg19; 0=egg21; 0=egg41; 10000 = finishtext]
/ showmousecursor = true
/ inputdevice = dragdrop
/ recorddata = true
/ response = anyresponse
/ responseinterrupt = trial
/ beginresponseframe = 0
</trial>

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

<expt>
/ blocks=[1=myblock]
</expt>



This example

<instruct>
/ fontstyle = ("Arial", 2.8%, false, false, false, false, 5, 1) / txcolor = (white) / screencolor = black / wait = 1000 </instruct>

<page intro>
In the following task, you will be presented with negative words related to outcomes of smoking or with positive words you may experience if you quit smoking. You will also see an image of a cigarette, and the word 'me' on the page.
~n~nYour task is to:
~n* Drag the negative words away from you and towards the cigarette.
Drag the positive words towards the word 'me'.
~n~nPress the spacebar to begin.
</page>

<expt>
/ preinstructions = (intro)
/ blocks = [1=intervention]
/ postinstructions = (end)
</expt>

<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
/11 = "stroke"
/12 = "asthma"
/13 = "feel unwell"
/14 = "out of breath"
/15 = "trapped"
/16 = "premature death"
/17 = "pollution"
/18 = "illness"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
/11 = "breathe easily"
/12 = "independent"
/13 = "clean"
/14 = "energetic"
/15 = "feel good"
/16 = "wellbeing"
</item>

<item smoking>
/1 = "smoking1.jpg"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 15%)
/ dropsource = true
</text>

<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 15%)
/ droptarget = true
</text>

<picture smoking>
/ items = smoking
/ position = (50%, 10%)
/ size = (15%, 15%)
/ erase = false
/ droptarget = true
</picture>

<trial positive>
/ ontrialbegin = [
    text.positive.hposition = 50%;
    text.positive.vposition = 50%;
]
/ stimulusframes = [1 = positive, me, smoking] / inputdevice = dragdrop / showmousecursor = true / validresponse = (me, smoking) / correctresponse = (me) </trial>

<trial negative>
/ ontrialbegin = [
    text.negative.hposition = 50%;
    text.negative.vposition = 50%;
]
/ stimulusframes = [1 = negative, me, smoking] / inputdevice = dragdrop / showmousecursor = true / validresponse = (me, smoking) / correctresponse = (smoking) </trial>

<block intervention>
/trials = [1-68 = replacenorepeat(positive,negative)]
</block>

<page end>
You have reached the end of the task.
^^Thank you! Continue to enjoy being a non-smoking (or smoking less)!
</page>

as well as this thread here https://www.millisecond.com/forums/Topic24644.aspx should be useful with respect to setting up drag & drop mechanics properly.


I managed to get it to work, thanks! One more question about this. Is it also possible to keep looping the trials until the participant presses a certain button? (i.e. that the participant can determine when the stop the task)

Dave
Dave
Supreme Being
Supreme Being (467K reputation)Supreme Being (467K reputation)Supreme Being (467K reputation)Supreme Being (467K reputation)Supreme Being (467K reputation)Supreme Being (467K reputation)Supreme Being (467K reputation)Supreme Being (467K reputation)Supreme Being (467K reputation)

Group: Administrators
Posts: 9K, Visits: 38K
scollin - Monday, August 27, 2018


I managed to get it to work, thanks! One more question about this. Is it also possible to keep looping the trials until the participant presses a certain button? (i.e. that the participant can determine when the stop the task)

Yes, that's possible. Taking the 1st example I posted here, you would do it like this:

<instruct>
/ fontstyle = ("Arial", 2.8%, false, false, false, false, 5, 1)
/ txcolor = (white)
/ screencolor = black
</instruct>

<page intro>
^In the following task, you will be presented with negative words related to outcomes of smoking or with positive words you may experience if you quit smoking. You will also see an image of a cigarette, and the word 'me' on the page.
~n~nYour task is to:
~n* Drag the negative words away from you and towards the cigarette.
Drag the positive words towards the word 'me'.
~n~nPress the spacebar to begin.
</page>

<page end>
^This is the end.
</page>


<expt>
/ preinstructions = (intro)
/ blocks = [1=intervention]
/ postinstructions = (end)
</expt>

<item negative>
/1 = "lung cancer"
/2 = "addiction"
/3 = "heart disease"
/4 = "clogged arteries"
/5 = "blindness"
/6 = "amputation"
/7 = "death"
/8 = "tongue cancer"
/9 = "throat cancer"
/10 = "gangrene"
/11 = "stroke"
/12 = "asthma"
/13 = "feel unwell"
/14 = "out of breath"
/15 = "trapped"
/16 = "premature death"
/17 = "pollution"
/18 = "illness"
</item>

<item positive>
/1 = "healthy"
/2 = "vibrant"
/3 = "free"
/4 = "happy"
/5 = "in control"
/6 = "long life"
/7 = "energetic"
/8 = "refreshed"
/9 = "good"
/10 = "rewarding"
/11 = "breathe easily"
/12 = "independent"
/13 = "clean"
/14 = "energetic"
/15 = "feel good"
/16 = "wellbeing"
</item>

<item smoking>
/1 = "smoking"
</item>

<item me>
/1 = "me"
</item>

<text positive>
/ items = positive
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 10%)
/ dropsource = true
</text>

<text negative>
/ items = negative
/ valign = center
/ halign = center
/ position = (50%, 50%)
/ txcolor = green
/ fontstyle = ("Arial", 10%)
/ dropsource = true
</text>

<text me>
/ items = me
/ valign = bottom
/ halign = center
/ position = (50%, 95%)
/ txcolor = black
/ fontstyle = ("Arial", 10%)
/ erase = false
/ droptarget = true
</text>

<text smoking>
/ items = smoking
/ valign = bottom
/ halign = center
/ position = (50%, 10%)
/ txcolor = black
/ fontstyle = ("Arial", 10%)
/ erase = false
/ droptarget = true
</text>

<trial positive>
/ ontrialbegin = [
    text.positive.hposition = 50%;
    text.positive.vposition = 50%;
]
/ stimulusframes = [1 = positive, me, smoking, end]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, end)
/ correctresponse = (me)
/ branch = [
    if(trial.positive.response != "end") list.triallist.nextvalue;
]
</trial>

<trial negative>
/ ontrialbegin = [
    text.negative.hposition = 50%;
    text.negative.vposition = 50%;
]
/ stimulusframes = [1 = negative, me, smoking, end]
/ inputdevice = dragdrop
/ showmousecursor = true
/ validresponse = (me, smoking, end)
/ correctresponse = (smoking)
/ branch = [
    if(trial.negative.response != "end") list.triallist.nextvalue;
]
</trial>

<block intervention>
/trials = [1 = list.triallist]
</block>

<list triallist>
/ items = (trial.positive, trial.negative)
/ poolsize = 10
</list>

<text end>
/ items = ("Click here to end the task.")
/ txbgcolor = black
/ txcolor = white
/ erase = false
/ vjustify = center
/ size = (24%, 6%)
/ position = (85%, 90%)
</text>


GO


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....






Millisecond Forums


Search