Displaying pics using conditional


Author
Message
anabela_c
anabela_c
Respected Member (320 reputation)Respected Member (320 reputation)Respected Member (320 reputation)Respected Member (320 reputation)Respected Member (320 reputation)Respected Member (320 reputation)Respected Member (320 reputation)Respected Member (320 reputation)Respected Member (320 reputation)
Group: Forum Members
Posts: 23, Visits: 75
Hi (Dave?) :)

I need to display a picture based on a previous selected response (radiobuttons) but I am not sure on how to implement a conditional within the picture (if is possible). I am trying as follows (with the surveypage option, perhaps is better to use the ‘optionvalues' but I don’t know how):


<picture OfferPic>
/ items = [
    if (radiobuttons.CoalitionPartner.response == "YOU - <%item.avatarallo.item(text.avatarallo_match.currentindex)%> coalition"){picture.OfferBoxPartner.items =
        "200.bmp"                                    
    } else {picture.OfferBoxPartner.items =
        "160.bmp"
    };
]
/ position = (30%,50%)
/ size = (60%,60%)
</picture>


<surveypage CoalitionOffer>
/ questions = [1=OfferBox1, OfferBox2]
/ stimulusframes = [1 = clearscreen, OfferPic]
/ showbackbutton = false
/ showquestionnumbers = false
/ showpagenumbers = false
/ showmousecursor = true
/ navigationbuttonsize = (15,5)
/ finishlabel = "Click here to continue"
</surveypage>

<surveypage CoalitionPartner>
/ questions = [1=CoalitionPartner]
/ stimulusframes = [1 = CoalitionPartnerText,CoalitionPartnerEgo, CoalitionPartnerAllo]
/ showbackbutton = false
/ showquestionnumbers = false
/ showpagenumbers = false
/ showmousecursor = true
/ navigationbuttonsize = (15,5)
/ finishlabel = "Click here to continue"
/ nextbuttonposition = (42,90)
</surveypage>

<radiobuttons CoalitionPartner>
/ options = ("YOU - <%item.avatarallo.item(text.avatarallo_match.currentindex)%> coalition","YOU - <%item.avatarego.item(text.avatarego_match.currentindex)%> coalition")
/ responsefontstyle = ("Arial", 3%, true)
/ optionvalues = ("allo", "ego")
/ orientation = horizontal
/ size = (25, 10)
/ position = (25%, 70%)
</radiobuttons>

<textbox OfferBox1>
/ required = true
/ textboxsize = (5,5)
/ position = (67%, 52%)
/ required = true
</textbox>

<textbox OfferBox2>
/ required = true
/ textboxsize = (5,5)
/ position = (67%, 62%)
/ required = true
</textbox>

<text CoalitionPartnerText>
/ items = ("Please indicate which coalition you want to form:")
/ fontstyle = ("Arial", 3%, true)
/ position = (49%,10%)
</text>

<text CoalitionPartnerEgo>
/ items = avatarego
/ fontstyle = ("Arial", 3%, true)
/ select = current(text.avatarego_match)
/ position = (75, 30)
</text>

<text CoalitionPartnerAllo>
/ items = avatarallo
/ fontstyle = ("Arial", 3%, true)
/ select = current(text.avatarallo_match)
/ position = (23, 30)
</text>

<item avatarego>
/1="DUNLOP"
/2="BENSON"
</item>

<item avatarallo>
/1="BENSON"
/2="DUNLOP"
</item>

<text avatarego_match>
/ items = avatarego
/ fontstyle = ("Arial", 3%, true)
/ position = (29, 30)
</text>

<text avatarallo_match>
/ items = avatarallo
/ fontstyle = ("Arial", 3%, true)
/ position = (71, 30)
</text>

<block Trial1>
/ trials = [
    1= CoalitionPartner;
    2= CoalitionOffer;
</block>

I tried to edit the script to make it shorter, let me know if you need other parts!

Thanks in advance!
Anabela

Attachments
160.bmp (298 views, 2.00 MB)
200.bmp (301 views, 2.00 MB)
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
anabela_c - 3 Years Ago
     You simply do:
Dave - 3 Years Ago
anabela_c - 3 Years Ago
Dave - 3 Years Ago
                     Oh my apologies! thanks a lot!
anabela_c - 3 Years Ago
anabela_c - 2 Years Ago
Dave - 2 Years Ago

Reading This Topic

Explore
Messages
Mentions
Search