Millisecond Forums

dragging multiple drop source stimuli onto one target

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

By nc - 6/25/2020

Hi,
I have an experiment in which I'm trying to place 8 separate items, each into one of 2 boxes. The first item placed into a box works well, but the second item that gets placed disappears. I'm producing the relevant code below:

Here are the 8 items I'd like to be dragged:
<picture sharing_sticker_1>
/items = stimuli
/select = 19
/size = (100,100)
/hposition = 15%
/vposition = 80%
/dropsource = true
</picture>

<picture sharing_sticker_2>
/items = stimuli
/select = 19
/size = (100,100)
/hposition = 25%
/vposition = 80%
/ dropsource = true
</picture>

<picture sharing_sticker_3>
/items = stimuli
/select = 19
/size = (100,100)
/hposition = 35%
/vposition = 80%
/dropsource = true
</picture>

<picture sharing_sticker_4>
/items = stimuli
/select = 19
/size = (100,100)
/hposition = 45%
/vposition = 80%
/dropsource = true
</picture>

<picture sharing_sticker_5>
/items = stimuli
/select = 19
/size = (100,100)
/hposition = 55%
/vposition = 80%
/dropsource = true
</picture>

<picture sharing_sticker_6>
/items = stimuli
/select = 19
/size = (100,100)
/hposition = 65%
/vposition = 80%
/dropsource = true
</picture>

<picture sharing_sticker_7>
/items = stimuli
/select = 19
/size = (100,100)
/hposition = 75%
/vposition = 80%
/dropsource = true
</picture>

<picture sharing_sticker_8>
/items = stimuli
/select = 19
/size = (100,100)
/hposition = 85%
/vposition = 80%
/dropsource = true
</picture>

Here are the 2 drop targets (boxes) that I'd like each of the 8 pictures to be dragged into.

<shape box_left>
/hposition = 90%
/vposition = 60%
/size = (400,400)
/color = burlywood
/droptarget = true
</shape>

<shape box_right>
/hposition = 10%
/vposition = 60%
/size = (400,400)
/color = burlywood
/droptarget=true
</shape>

And here is the relevant trial:

<trial 2_stickers_child_answer>
/ stimulusframes = [1=1_sticker_kept,1_sticker_shared, continue,
sharing_sticker_1,
sharing_sticker_2,
sharing_sticker_3,
sharing_sticker_4,
sharing_sticker_5,
sharing_sticker_6,
sharing_sticker_7,
sharing_sticker_8,
box_left,
box_right]
/ inputdevice = dragdrop
/ showmousecursor = true
/droptargets = (box_left, box_right)
/ validresponse = (continue)
</trial>
By nc - 6/25/2020

nc - 6/26/2020
Hi,
I have an experiment in which I'm trying to place 8 separate items, each into one of 2 boxes. The first item placed into a box works well, but the second item that gets placed disappears. I'm producing the relevant code below:

Here are the 8 items I'd like to be dragged:
<picture sharing_sticker_1>
/items = stimuli
/select = 19
/size = (100,100)
/hposition = 15%
/vposition = 80%
/dropsource = true
</picture>

<picture sharing_sticker_2>
/items = stimuli
/select = 19
/size = (100,100)
/hposition = 25%
/vposition = 80%
/ dropsource = true
</picture>

<picture sharing_sticker_3>
/items = stimuli
/select = 19
/size = (100,100)
/hposition = 35%
/vposition = 80%
/dropsource = true
</picture>

<picture sharing_sticker_4>
/items = stimuli
/select = 19
/size = (100,100)
/hposition = 45%
/vposition = 80%
/dropsource = true
</picture>

<picture sharing_sticker_5>
/items = stimuli
/select = 19
/size = (100,100)
/hposition = 55%
/vposition = 80%
/dropsource = true
</picture>

<picture sharing_sticker_6>
/items = stimuli
/select = 19
/size = (100,100)
/hposition = 65%
/vposition = 80%
/dropsource = true
</picture>

<picture sharing_sticker_7>
/items = stimuli
/select = 19
/size = (100,100)
/hposition = 75%
/vposition = 80%
/dropsource = true
</picture>

<picture sharing_sticker_8>
/items = stimuli
/select = 19
/size = (100,100)
/hposition = 85%
/vposition = 80%
/dropsource = true
</picture>

Here are the 2 drop targets (boxes) that I'd like each of the 8 pictures to be dragged into.

<shape box_left>
/hposition = 90%
/vposition = 60%
/size = (400,400)
/color = burlywood
/droptarget = true
</shape>

<shape box_right>
/hposition = 10%
/vposition = 60%
/size = (400,400)
/color = burlywood
/droptarget=true
</shape>

And here is the relevant trial:

<trial 2_stickers_child_answer>
/ stimulusframes = [1=1_sticker_kept,1_sticker_shared, continue,
sharing_sticker_1,
sharing_sticker_2,
sharing_sticker_3,
sharing_sticker_4,
sharing_sticker_5,
sharing_sticker_6,
sharing_sticker_7,
sharing_sticker_8,
box_left,
box_right]
/ inputdevice = dragdrop
/ showmousecursor = true
/droptargets = (box_left, box_right)
/ validresponse = (continue)
</trial>
By nc - 6/25/2020

just wanted to update that I found a solution by adding /dropposition = (anywhere, anywhere) to my droptarget stimuli. All good! 
nc - 6/26/2020
nc - 6/26/2020
Hi,
I have an experiment in which I'm trying to place 8 separate items, each into one of 2 boxes. The first item placed into a box works well, but the second item that gets placed disappears. I'm producing the relevant code below:

Here are the 8 items I'd like to be dragged:
<picture sharing_sticker_1>
/items = stimuli
/select = 19
/size = (100,100)
/hposition = 15%
/vposition = 80%
/dropsource = true
</picture>

<picture sharing_sticker_2>
/items = stimuli
/select = 19
/size = (100,100)
/hposition = 25%
/vposition = 80%
/ dropsource = true
</picture>

<picture sharing_sticker_3>
/items = stimuli
/select = 19
/size = (100,100)
/hposition = 35%
/vposition = 80%
/dropsource = true
</picture>

<picture sharing_sticker_4>
/items = stimuli
/select = 19
/size = (100,100)
/hposition = 45%
/vposition = 80%
/dropsource = true
</picture>

<picture sharing_sticker_5>
/items = stimuli
/select = 19
/size = (100,100)
/hposition = 55%
/vposition = 80%
/dropsource = true
</picture>

<picture sharing_sticker_6>
/items = stimuli
/select = 19
/size = (100,100)
/hposition = 65%
/vposition = 80%
/dropsource = true
</picture>

<picture sharing_sticker_7>
/items = stimuli
/select = 19
/size = (100,100)
/hposition = 75%
/vposition = 80%
/dropsource = true
</picture>

<picture sharing_sticker_8>
/items = stimuli
/select = 19
/size = (100,100)
/hposition = 85%
/vposition = 80%
/dropsource = true
</picture>

Here are the 2 drop targets (boxes) that I'd like each of the 8 pictures to be dragged into.

<shape box_left>
/hposition = 90%
/vposition = 60%
/size = (400,400)
/color = burlywood
/droptarget = true
</shape>

<shape box_right>
/hposition = 10%
/vposition = 60%
/size = (400,400)
/color = burlywood
/droptarget=true
</shape>

And here is the relevant trial:

<trial 2_stickers_child_answer>
/ stimulusframes = [1=1_sticker_kept,1_sticker_shared, continue,
sharing_sticker_1,
sharing_sticker_2,
sharing_sticker_3,
sharing_sticker_4,
sharing_sticker_5,
sharing_sticker_6,
sharing_sticker_7,
sharing_sticker_8,
box_left,
box_right]
/ inputdevice = dragdrop
/ showmousecursor = true
/droptargets = (box_left, box_right)
/ validresponse = (continue)
</trial>
By nc - 6/26/2020

I have a follow-up question. Can you explain how I can reset the position of my dropsource stimuli? I use the same stimuli across multiple trials. When one trial ends and the next one begins, it seems that the stimuli all appear in the positions they were placed in during the previous trial. I don't want this to happen.
nc - 6/26/2020
just wanted to update that I found a solution by adding /dropposition = (anywhere, anywhere) to my droptarget stimuli. All good! 
nc - 6/26/2020
nc - 6/26/2020
Hi,
I have an experiment in which I'm trying to place 8 separate items, each into one of 2 boxes. The first item placed into a box works well, but the second item that gets placed disappears. I'm producing the relevant code below:

Here are the 8 items I'd like to be dragged:
<picture sharing_sticker_1>
/items = stimuli
/select = 19
/size = (100,100)
/hposition = 15%
/vposition = 80%
/dropsource = true
</picture>

<picture sharing_sticker_2>
/items = stimuli
/select = 19
/size = (100,100)
/hposition = 25%
/vposition = 80%
/ dropsource = true
</picture>

<picture sharing_sticker_3>
/items = stimuli
/select = 19
/size = (100,100)
/hposition = 35%
/vposition = 80%
/dropsource = true
</picture>

<picture sharing_sticker_4>
/items = stimuli
/select = 19
/size = (100,100)
/hposition = 45%
/vposition = 80%
/dropsource = true
</picture>

<picture sharing_sticker_5>
/items = stimuli
/select = 19
/size = (100,100)
/hposition = 55%
/vposition = 80%
/dropsource = true
</picture>

<picture sharing_sticker_6>
/items = stimuli
/select = 19
/size = (100,100)
/hposition = 65%
/vposition = 80%
/dropsource = true
</picture>

<picture sharing_sticker_7>
/items = stimuli
/select = 19
/size = (100,100)
/hposition = 75%
/vposition = 80%
/dropsource = true
</picture>

<picture sharing_sticker_8>
/items = stimuli
/select = 19
/size = (100,100)
/hposition = 85%
/vposition = 80%
/dropsource = true
</picture>

Here are the 2 drop targets (boxes) that I'd like each of the 8 pictures to be dragged into.

<shape box_left>
/hposition = 90%
/vposition = 60%
/size = (400,400)
/color = burlywood
/droptarget = true
</shape>

<shape box_right>
/hposition = 10%
/vposition = 60%
/size = (400,400)
/color = burlywood
/droptarget=true
</shape>

And here is the relevant trial:

<trial 2_stickers_child_answer>
/ stimulusframes = [1=1_sticker_kept,1_sticker_shared, continue,
sharing_sticker_1,
sharing_sticker_2,
sharing_sticker_3,
sharing_sticker_4,
sharing_sticker_5,
sharing_sticker_6,
sharing_sticker_7,
sharing_sticker_8,
box_left,
box_right]
/ inputdevice = dragdrop
/ showmousecursor = true
/droptargets = (box_left, box_right)
/ validresponse = (continue)
</trial>
By Dave - 6/26/2020

You'll want to set the <picture> elements' hposition and vposition properties back to their original / start values /ontrialbegin.

/ontrialbegin = [picture sharing_sticker_1.hposition = 15%;
picture sharing_sticker_1.vposition = 80%;
...
picture sharing_sticker_8.hposition = 85%;
picture sharing_sticker_8.vposition = 80%;
]
By nc - 6/26/2020

Dave - 6/26/2020
You'll want to set the <picture> elements' hposition and vposition properties back to their original / start values /ontrialbegin.

/ontrialbegin = [picture sharing_sticker_1.hposition = 15%;
picture sharing_sticker_1.vposition = 80%;
...
picture sharing_sticker_8.hposition = 85%;
picture sharing_sticker_8.vposition = 80%;
]

Makes sense - thanks!