Group: Forum Members
Posts: 9,
Visits: 35
|
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>
|