Millisecond Forums

Diplay pictures according to prior radio button selection and post text in front of picture

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

By mariela - 4/8/2014

Hi,

I have two questions on how to display pictures within Inquisit.

First I'd like to display one of two pictures according to a prior radio button selection on a survey page.

I tried to use the "/ ontrialbegin = [if(radiobuttons.coinflip.response == "abc") ..." but I didn't know how to complete this command. Or do I rather have to specify the selectionmode when defining the picture element? Do you have any advice?


Furthermore I'd like to display the picture in the background and have words in front of the picture. Is it possible to do that?


Thanks a lot in advance!!
By mariela - 4/8/2014

Okay, I found the question to my first response by following the instructions that dave posted here: https://www.millisecond.com/forums/Topic12904.aspx

I'd still like to learn if it is possible to display text in front of pictures :)
By Dave - 4/8/2014

E.g.

<values>
/ mypictype = 1
</values>

<block myblock>
/ trials = [1=mypage; 2=mytrial]
</block>

<surveypage mypage>
/ questions = [1=q1]
</surveypage>

<radiobuttons q1>
/ caption = "I would like to see a picture of a ..."
/ options = ("cat.", "dog.")
</radiobuttons>

<trial mytrial>
/ ontrialbegin = [if (radiobuttons.q1.response=="cat.") values.mypictype = 1]
/ ontrialbegin = [if (radiobuttons.q1.response=="dog.") values.mypictype = 2]
/ stimulusframes = [1=mypic, myword1, myword2]
/ validresponse = (57)
</trial>

<picture mypic>
/ items = ("catpic.jpg", "dogpic.jpg")
/ select = values.mypictype
/ size = (40%, 40%)
</picture>

<text myword1>
/ items = ("Hi,")
/ txbgcolor = (transparent)
/ position = (50%, 35%)
</text>

<text myword2>
/ items = ("Kitty!", "Doggie!")
/ position = (50%, 65%)
/ txbgcolor = (transparent)
/ select = values.mypictype
</text>

By mariela - 4/9/2014

Thank you!