Visually show the cycling of text
So I have an array that is working to display a random question. Does anyone have any ideas how to make the loop actually show the cycling of the questions as they randomize?
//the number of questions in the array
maxQuestions = questions.length;
//get and return a random questions from array
function getRandomQuestion() {
//calculate a random index
var index = Math.floor(Math.random() * (maxQuestions - 1));
//return the random sentence
return questions[index];
}
for (i = 0; i < 20; i++) {
//print(getRandomQuestion());
script.thisText.text = getRandomQuestion()
}
Hi Jonathon,
Do you mean to just increment index?
Let me know if this is not what you mean.
Thanks!
Jonathan