Millisecond Forums

Adding picture to instruction page

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

By celeste - 5/19/2010

Hi,


I'm trying to ad a picture (tabel of the stimuli words) to a instruction page.  I have done it according to the picture element strategy, but it doesn't seem to work.  Where the smiley is, the picture has to be presented.  Presenting the categories (also mention as background in the instruction block, do get presented).



Here the script :



<item myinstructions2>


/1 = "Het gaat hier om een simpele sorteer taak.


In het midden van het scherm verschijnen 1 voor 1 één van de onderstaande woorden of een afbeelding.


[:)]




Jouw taak: geef aan of de woorden of de afbeeling bij de bovenstaande categoriën hoort."



Picture



</item>






<picture targetTabel>


/ items = ("Tabel.jpg")


/ size = (20%, 20%)


</picture>



<item targetTabel>


/1 = "Tabel.jpg"


</item>



The instructions:



<text myinstructions2>


/ items = myinstructions2


/ hjustify = left


/ size = (90%, 60%)


/ position = (50%, 90%)


/ valign = bottom


/ select = sequence


</text>



<trial myinstructions2>


/ stimulustimes = [1=myinstructions2, spacebar]


/ correctresponse = (" ")


/ errormessage = false


/ recorddata = false


</trial>


 


<block myinstructions2>


/ bgstim = (targetTabel, practiseAleft, orleft, practisetargetAleftmixed, practiseBright)


/ trials = [1 =myinstructions2]


/ recorddata = false


</block>







I do not understand why the items of /bgstim (practiseAleft, orleft, practisetargetAleftmixed, practiseBright) do get presented, but not the targetTabel.  No errors occur.


I've added the script.


By IvoR - 5/19/2010

Hey Celeste,


To solve your problem is to put the picture in the /stimulustimes of the myinstructions2 trial. You will have to fool around with the position of the picture a bit, but you'll probably get it right. Because you've uploaded the data file (.dat) instead of the experiment file (.exp), I couldn't check your script, but the picture is probably put behind another element.  Try adding /txbgcolor = (transparent) to the <text> element.
Also, if you would like your picture to be between to different lines, you should maybe use either two text elements for the sentence beneath the smiley/picture, or you could use ~n to indicate a newline in your text (so putting multiple ~n behind a sentence will create a clear space).


Hope this helped,

Ivor 

By Emilie - 5/8/2014

I’m also trying to add pictures to the instruction page, but somethingis not working. Pictures appear in the middle of the screen instead of where Iwould like them to be. I used the approach avoidance template that is online andthe instructions are counterbalanced by group member. So the pictures presentedshould differ depending on the experimental condition. Is it possible?

 

<item instructions>

/1 ="In the following task, you will be presented images either inlandscape or portrait format.

~n~nYour task is to:

~n* PULL the joystick towards you if you see an image in<%values.format1%>  format <%values.picture1%>

* PUSH the joystick away from you if you see an image in<%values.format2%> format <%values.picture2%> ."

</item>

 

<picture picture1>

/ items = ("grayrectangle_L.jpg")

/ size = (10%, 10%)

</picture>

 

<picture picture2>

/ items = ("grayrectangle_P.jpg")

/ size = (10%,10%)

</picture>

 

<item picture1>

/1 = "grayrectangle_L.jpg"

</item>

 

<item picture2>

/1 = "grayrectangle_P.jpg"

</item>

 

<text instructions>

/items = instructions

/select = sequence

/position = (50%, 50%)

/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 0)

/txcolor = black

/txbgcolor = (transparent)

/resetinterval = 3

/size = (80%, 80%)

</text>

 

<trial instructions>

/stimulusframes = [1 = instructions, picture1, picture2]

/validresponse = ("left")

/recorddata = false

/branch = [trial.instruct_joystickrest]

</trial>

 

<block instructions>

/bgstim = (picture1, picture2)

/trials = [1 = instructions]

/recorddata = false

</block>

 

********************************

EXPERIMENT

*********************************

<expt >

/ onexptbegin = [values.expcondition = 1]

/ onexptbegin = [values.format1 = "PORTRAIT"; values.format2= "LANDSCAPE"]

/ onexptbegin = [values.picture1 = picture2; values.picture2 = picture1]

/ subjects = (1 of 2)

/groupassignment = groupnumber

/ onexptbegin = [values.startheight_A =values.Startheight_ratioA*values.Maxheight_px]

/ onexptbegin = [values.startheight_B = values.Startheight_ratioB*values.Maxheight_px]

/ blocks = [1 = SequenceGenerator; 2 = id; 3 = practice_AAT; 4 = AAT]

/ postinstructions = (End)

</expt>

 

<expt >

/ onexptbegin = [values.expcondition = 2]

/ onexptbegin = [values.format2 = "PORTRAIT"; values.format1= "LANDSCAPE"]

/ onexptbegin = [values.picture2 = picture2; values.picture1 = picture1]

 

/ subjects = (2 of 2)

/groupassignment = groupnumber

/ onexptbegin = [values.startheight_A =values.Startheight_ratioA*values.Maxheight_px]

/ onexptbegin = [values.startheight_B =values.Startheight_ratioB*values.Maxheight_px]

/ blocks = [1 = SequenceGenerator; 2 = id; 3 = practice_AAT; 4 = AAT]

/ postinstructions = (End)

</expt>

By Dave - 5/8/2014

> Pictures appear in the middle of the screen instead of where Iwould like them to be.

You need to specify the respective <picture> elements' /position attribute to place them where you want them. If you don't, any stimulus will be presented in the screen center by default.

So the pictures presentedshould differ depending on the experimental condition. Is it possible?

Yes, works just like counterbalancing in any other case. For efficiency you'll want to do something like

<picture instructionspic>
/ items = ("Firstgroup.jpg", "Secondgroup.jpg")
[...]
/ select = values.expcondition
</picture>


By macca1 - 3/7/2016

I'm trying to add an image to a questionnaire. I have the questionnaire and survey pages setup, but I need an image above as a guide for the partcipants. Can anyone help?
By Dave - 3/7/2016

Set up an <image> element. Use its /position attribute to position it on-screen as desired. Use the <surveypage>'s /questions attribute to display the image along with all the other questions on the page.

<image myimage>
/ items = ("guide.jpg")
/ position = (0%,0%)
...
</image>

<surveypage mypage>
/ questions = [1=myimage; 2=...]
...
</surveypage>