+x+xIf you want response to be a click on a picture element, set the trials' /inputdevice to mouse and define the name of the displayed picture elements in /validresponse.
How will I know which "area" of the picture someone clicked on?
responsex and responsey and math based on the screen area inhabited by the image.
https://www.millisecond.com/support/docs/v5/html/language/properties/responsex.htm
https://www.millisecond.com/support/docs/v5/html/language/properties/responsey.htm
https://www.millisecond.com/support/docs/v5/html/language/properties/top.htm
https://www.millisecond.com/support/docs/v5/html/language/properties/left.htm
<picture examplepicture>
/ items = ("example.png")
/ position = (50%,50%)
/ size = (80%, 80%)
</picture>
<trial exampletrial>
/ stimulusframes = [1=examplepicture]
/ inputdevice = mouse
/ validresponse = (examplepicture)
/ ontrialend = [
values.img_widthpx = picture.examplepicture.right - picture.examplepicture.left;
values.img_heightpx = picture.examplepicture.bottom - picture.examplepicture.top;
values.responsex_in_img = trial.exampletrial.responsex - picture.examplepicture.left;
values.responsey_in_img = trial.exampletrial.responsey - picture.examplepicture.top;
values.responsex_pct = (values.responsex_in_img/values.img_widthpx)*100;
values.responsey_pct = (values.responsey_in_img/values.img_heightpx)*100;
]
</trial>
<values>
/ img_widthpx = 0
/ img_heightpx = 0
/ responsex_in_img = -1
/ responsey_in_img = -1
/ responsex_pct = -1
/ responsey_pct = -1
</values>
<block exampleblock>
/ trials = [1-4 = exampletrial]
</block>
<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode latency response trial.exampletrial.responsex trial.exampletrial.responsey
values.responsex_in_img values.responsey_in_img values.responsex_pct values.responsey_pct
values.img_widthpx values.img_heightpx)
/ separatefiles = true
</data>