By JackKosno - 11/5/2016
Hello everyone,
I'm trying to change implementation of one of examples, naming Corsi Block task by changing text elements into picture one. Unfortunatelly I have a problem with simulating "yellow" block instead changing bgcollor in text element.
I was trying to use shape element and placing it on selected element with it's width and heinght, but it's going a bit randomly. I was wondering how to change presented pictures on element that replaced pure text elements, or maybe how to implement covering pictures with shape.
Thanks for your help. Jacek
|
By Dave - 11/6/2016
+xHello everyone, I'm trying to change implementation of one of examples, naming Corsi Block task by changing text elements into picture one. Unfortunatelly I have a problem with simulating "yellow" block instead changing bgcollor in text element. I was trying to use shape element and placing it on selected element with it's width and heinght, but it's going a bit randomly. I was wondering how to change presented pictures on element that replaced pure text elements, or maybe how to implement covering pictures with shape. Thanks for your help. Jacek What you do is:
#1: Change the various "block" <text> elements to <picture> elements. #2: Have two items for each <picture> elements -- one for the "unmarked" block, one for the "marked" block (a yellow square). #3: Use values for selection between the two items. When a block is selected / clicked, change the value from 1 to 2.
<values> ... /block1item = 1 ... </values>
<picture 1> / items = ("unmarked.jpg", "marked.jpg") / select = values.block1item / size = (expressions.blocksize, expressions.blocksize) / hposition = 1px*(125/expressions.mmtopx)+expressions.leftmargin / vposition = 1px*(155/expressions.mmtopx)+expressions.topmargin </picture>
<trial getseq> / stimulustimes = [0=board,getready; 1000=board,1,2,3,4,5,6,7,8,9] ... / ontrialend = [values.block1item=1; ...] ... </trial>
<trial showseq> / ontrialbegin = [values.highlightedblock=list.blockseq.nextvalue; values.tapcount+=1] / ontrialbegin = [if(values.highlightedblock==1)values.block1item=2;...] ... </trial>
<trial recallseq> / inputdevice = mouse / stimulusframes = [1=board,1,2,3,4,5,6,7,8,9,reset,done] / validresponse = (1,2,3,4,5,6,7,8,9,reset,done) / ontrialend = [if(trial.recallseq.response=="1") values.block1item=2 else values.block1item=1;...] ... </trial>
and so forth. The 2nd picture item -- "marked.jpg" -- should have the same dimensions as the regular "unmarked" block image(s).
Hope this helps.
|
By JackKosno - 11/7/2016
+x+xHello everyone, I'm trying to change implementation of one of examples, naming Corsi Block task by changing text elements into picture one. Unfortunatelly I have a problem with simulating "yellow" block instead changing bgcollor in text element. I was trying to use shape element and placing it on selected element with it's width and heinght, but it's going a bit randomly. I was wondering how to change presented pictures on element that replaced pure text elements, or maybe how to implement covering pictures with shape. Thanks for your help. Jacek What you do is: #1: Change the various "block" <text> elements to <picture> elements. #2: Have two items for each <picture> elements -- one for the "unmarked" block, one for the "marked" block (a yellow square). #3: Use values for selection between the two items. When a block is selected / clicked, change the value from 1 to 2. <values> ... /block1item = 1 ... </values> <text 1> / items = ("unmarked.jpg", "marked.jpg") / select = values.block1item/ size = (expressions.blocksize, expressions.blocksize) / hjustify = center / vjustify = center / erase = true(transparent) / hposition = 1px*(125/expressions.mmtopx)+expressions.leftmargin / vposition = 1px*(155/expressions.mmtopx)+expressions.topmargin </text> <trial getseq> / stimulustimes = [0=board,getready; 1000=board,1,2,3,4,5,6,7,8,9] ... / ontrialend = [values.block1item=1; ...]... </trial> <trial showseq> / ontrialbegin = [values.highlightedblock=list.blockseq.nextvalue; values.tapcount+=1] / ontrialbegin = [if(values.highlightedblock==1) values.block1item=2;...] ... </trial> <trial recallseq> / inputdevice = mouse / stimulusframes = [1=board,1,2,3,4,5,6,7,8,9,reset,done] / validresponse = (1,2,3,4,5,6,7,8,9,reset,done) / ontrialend = [if(trial.recallseq.response=="1") values.block1item=2 else values.block1item=1;...] ... </trial> and so forth. The 2nd picture item -- "marked.jpg" -- should have the same dimensions as the regular "unmarked" block image(s). Hope this helps. Thank you very much for response, this solution is working perfectly :)
|
|