picture size


Author
Message
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: 13K, Visits: 104K
Example based on the previous ones I gave you in another thread:

<values>
/ aclickcount = 0
/ arequiredcount = 1
/ ahpos = 0%
/ bhpos = 0%
/ asize = 40%
</values>

<expt>
/ blocks = [1-4=choiceblock]
</expt>

<block choiceblock>
/ onblockbegin = [if (block.choiceblock.totalcount > 0) values.arequiredcount = 2 * values.arequiredcount; ]
/ trials = [1-10=choice]
</block>

<trial choice>
/ ontrialbegin = [if (values.aclickcount <= 0) {values.ahpos=list.indicehposition.nextvalue; values.bhpos=list.indicehposition.nextvalue; values.asize=40%}; ]
/ ontrialend = [if (trial.choice.response=="astim") {values.aclickcount+=1; values.asize=values.asize*0.5; }; ]
/ stimulusframes = [1=astim, bstim, debug]
/ validresponse = (astim, bstim)
/ inputdevice = mouse
/ branch = [if (trial.choice.response=="bstim") trial.b]
/ branch = [if (trial.choice.response=="astim" && values.aclickcount>=values.arequiredcount) trial.a else trial.choice]
</trial>

<list indicehposition>
/ items = (25%, 75%)
/ selectionrate = always
</list>

<trial a>
/ ontrialend = [values.aclickcount=0]
/ stimulusframes = [1=mytext, debug]
/ validresponse = (57)
</trial>

<trial b>
/ ontrialend = [values.aclickcount=0]
/ stimulusframes = [1=mytext, debug]
/ validresponse = (57)
</trial>

<text astim>
/ items = ("A")
/ txbgcolor = (blue)
/ vposition = 50%
/ hposition = values.ahpos
/ size = (values.asize, values.asize)
</text>

<text bstim>
/ items = ("B")
/ txbgcolor = (green)
/ vposition = 50%
/ hposition = values.bhpos
/ size = (40%, 40%)
</text>

<text mytext>
/ items = ("<%script.currenttrial%>")
</text>

<text debug>
/ items = ("A clicks required: <%values.arequiredcount%> | A clicks made: <%values.aclickcount%>")
/ position = (50%, 10%)
/ erase = false
</text>


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: 13K, Visits: 104K
The /size attribute accepts variables (<values> entries), i.e. you can simply set those to the desired value after each click using /ontrialend logic.

Lucie1043
Lucie1043
Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)Expert (1.5K reputation)
Group: Forum Members
Posts: 15, Visits: 183
Hi,

I am running an experiment that shows a picture in the middle of the screen. The participant has to click X times on this picture in order to have access to a subsequent task.

I would like the size of the picture to be divided by half every time the participant clicks on it.

Do you have any idea on the way to configure that?

Thank you,

Lucie




GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search