PennController for IBEX › Forums › Support › rating scale under images
- This topic has 4 replies, 2 voices, and was last updated 1 year, 8 months ago by Jeremy.
-
AuthorPosts
-
December 11, 2022 at 4:06 pm #9787ElRkParticipant
Hello,
I’m setting an experiment with pairs of sentence-picture and I need a 5point scale at the bottom of the photo.
I’ve tried a lot of things and I can insert a scale but I haven’t find a way for the scale to appear under the image (and not on the left of it).
You can access the experiment here : https://farm.pcibex.net/r/RLwLNB/
Many thanks in advance!
December 12, 2022 at 3:40 pm #9793JeremyKeymasterHello,
You print an element below another one by calling
print()
on the latter after calling it on the former. You are actually already doing this to print your Image elements below your Text elements (although you then move the Image element inside a Canvas element that only contains it, which seems unnecessary):PennController("univ.exist", newText("Κάθε κομμώτρια χτένισε κάποια γυναίκα.") //// Set #2 , 2.7 .center() .print() , newImage("2.7.jpg") .settings.size( 300 , 200 ) .print() , newCanvas("side-by-side", 450-200) .add( 0, 0, getImage("2.7.jpg")) .center() .print() , newKey (" ") .wait() )
So all you need to do is print a Scale element after the Image element, like this:
newTrial("univ.exist", newText("Κάθε κομμώτρια χτένισε κάποια γυναίκα.") .center() .print() , newImage("2.7.jpg") .size( 300 , 200 ) .center() .print() , newScale("answer", 5) .log() .css({"max-width":280,width:280,color:"blue"}) .button() .before( newText("(Διαφωνώ) ").italic() ) .after( newText(" (Συμφωνώ)").italic() ) .center() .print() .wait() )
Jeremy
December 12, 2022 at 4:10 pm #9795ElRkParticipantJeremy,
thank you so much for your help!
It’s working!December 15, 2022 at 6:25 am #9796ElRkParticipantHello Jeremy,
In the previous version (before adding the scale), the experiment was running successfully on every trial and the images were always loading successfully.
Since I added the scale coding there’s trouble loading the images. Some images are loaded immediately and others don’t (the following message shows up:
“Please wait while the resources are preloading-This may take up to 1min.”).I’m sorry for bothering you again but I can’t find a solution. I know that there’s not a problem with the scale coding because I have a draft version with only 5 trials and it works perfectly.
Maybe I have overseen something.. I’m sharing the links in case that you could take a look.full version that doesn’t work: https://farm.pcibex.net/r/RLwLNB/
draft version: https://farm.pcibex.net/r/dkOiEJ/Best regards,
EleniDecember 15, 2022 at 1:02 pm #9797JeremyKeymasterHello Eleni,
All the
.jpg
files whose names start with0
in your project’s Resources folder lack a dot before the second digit, but your code does include a dot (eg.newImage("0.9.jpg")
but the file’s actual name is09.jpg
) — your draft project simply doesn’t reference any of those imagesEither remove the dots between
0
and the second digit in your code, or rename the files in your project and the problem should go awayJeremy
-
AuthorPosts
- You must be logged in to reply to this topic.