rating scale under images

PennController for IBEX Forums Support rating scale under images

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #9787
    ElRk
    Participant

    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!

    #9793
    Jeremy
    Keymaster

    Hello,

    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

    #9795
    ElRk
    Participant

    Jeremy,

    thank you so much for your help!
    It’s working!

    #9796
    ElRk
    Participant

    Hello 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,
    Eleni

    #9797
    Jeremy
    Keymaster

    Hello Eleni,

    All the .jpg files whose names start with 0 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 is 09.jpg) — your draft project simply doesn’t reference any of those images

    Either remove the dots between 0 and the second digit in your code, or rename the files in your project and the problem should go away

    Jeremy

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.