Question
I can't next to frame
Hello i'm new in Adobe Animate , I wanna make a quiz multiple choice , I want my quizzes to be random when they start and when they repeat. So I try to make the question randomly
I'm use 3 frame
1. Button Start
mc_kuis is the intance name from frame 2
loadPertanyaan is function for me to load the question in dynamic text here the code :
variabel I use
//variabel global
var data = [{
pertanyaan_text: "1+1",
jawaban: "2",
jawabann: ["1", "3", "2"]
}, {
pertanyaan_text: "Berapa Jumlah hari dalam Seminggu",
jawaban: "1",
jawabann: ["5", "7", "8"]
}, {
pertanyaan_text: "Bumi Merupakan Planet Ke-",
jawaban: "0",
jawabann: ["4", "5", "8"]
}, ];
var indexPertanyaan = 0;
var currentPertanyaan;
function loadPertanyaan(){
//Random Question
data= mixed(data);
//Take the first new question
currentPertanyaan = data[indexPertanyaan];
//load pertanyaan to dynamic text
mc_kuis.txt_Pertanyaan.text = currentPertanyaan.pertanyaan_text;
}
Thank for helping me solve this prolem
