Hello,
I am trying to let participants roll a die for ten times (ten different dices), but I cannot see the dice...
This is my code in HTML:
and this is my code in javascript added to the question:
Qualtrics.SurveyEngine.addOnload(function()
{var self = this;
var value_set = e
{key:"1",probability:1},
{key:"2",probability:1},
{key:"3",probability:1},
{key:"4",probability:1},
{key:"5",probability:1},
{key:"6",probability:1}
];
var images = {
base_url:'https://www.descil.ethz.ch/projects/1305-SensQuest/dice/img/',
ext:'.png',
init: 'qmark1.png'
};
// Instantiate dice 1
new Dice("dice1","throw1",{
possible_throws: 1,
value_set: value_set,
images: images,
result_callback: function(throw_nr,result_key){
// Save result to embedded data field (need
//not be set through survey flow settings)
Qualtrics.SurveyEngine.setEmbeddedData('result_matrix_embedded', result_key);
// Set choice by result key, choice index respectively
// Attention: choices must be in correct order (ie choice 1 must have value 1, etc)
self.setChoiceValue('1', result_key, true)
}
});
});
What am I doing wrong? I can't figure it out...