This is great! Question though - even with the sample file I (again, it’s my lack of Javascript knowledge) can’t figure out how to get the final score to show up on my last slide. What calls it from the background and physically puts it next to the “Total Correct” text?
I have a question. Everything went fine with this, but what if I want to play another timeline if my score is Zero? I have the window.quizScore at the first scene, I’ve tried to modify the “if, else” with no success. What can I do?
The example only increments the score when you are correct and the starting score is zero, so there’s not really a time when it would drop back down to zero. If you are decrementing the count in your code, perhaps you could post the zip of your own .hype document and we could provide better guidance for the changes.
Great functions! I have run into problem though, I have made two layouts for each scene, one for desktop and one for mobile. I have duplicated the scripts and renamed the second ones to ie quizScore2, so each layout has its own scripts. The second IDs are taged with “xxx2”. Everything works fine - except for android phones. They double the score. Why? Any help much appreciated.
i did not test anything here in this thread, but if the above remains on click-events then for example android chrome will fire twice+. so you’ll better go with touchstart there …
Hi everyone, I am experimenting with Hype-javascript. I created a simple quiz. The quiz is almost working but I have 2 small issues:
1- When score is 0 the score window doesn't display any number
2- When user score max (5) the final score indicates 4 instead. (if you score lower result is correct)
Could you help me solve this issue. I been reading a lot of posts but I cannot find something directly related to my issue. I've enclosed the file here.
it worked!!!!! I still cannot see the 0 when someone gets 0 correct answers. Is it also something that simple or can I use a specific function? Something like if score=0 window.quizScore=0 ?
I think I also found the solution to the 0 issue. If I input the 0 in the text box. It will show 0+'X'
where X is the actual score. So 1 correct answer will display 01 but 0 correct answer will simply display 0. Haven't tried yet but I think it's most def the case.
Thanks! I didn't do it yet coz I just read it. But I share the result so far. I kind of like it although I need to fix couple of things! Digital Marketing-Design quiz 2.zip (1.5 MB)
with a different approach you can do a similar thing using only timeline. in this example, in the final scene you find a quiz. download
each event runs a parallel timeline.
What if i need to give every options of answers a number, I mean if he selected first option he got 1 and second answer he got 3, and add this number to the final result