Quantcast
Channel: Adobe Community : All Content - Edge Animate
Viewing all articles
Browse latest Browse all 9897

Quiz result not showing up in Edge

$
0
0

Hi there Edgers

 

Really hoping someone can help me out with this problem. I've used Redesigns code(Seen Below) to design a quiz in Animate.

 

I have two problems, when the first question is answered, it skips to the 3rd question instead of the 2nd. I am not sure why this is as I have have checked for overlapping buttons, there are none and it does not occur on any other questions, only the first. Second problem is the quiz reult is not showing up at the end, I have the "grade" and "result" divs in my timeline but when they are reached they do not change to display the quiz results.

 

Help would be much appeciated

 

i = 0;

sym.$("btn4","btn24","btn34","btn44","btn54","btn64","btn74").click(function(){

          i++;

          sym.play("s" + i);

          if (i==1){

                    q1 = 10;

                    //sym.$("question1").html(q1);

          }

          if (i==2){

                    q2 = 10;

                    //sym.$("question2").html(q2);

          }

          if (i==3){

                    q3 = 10;

                    //sym.$("question3").html(q3);

          }

          if (i==4){

                    q4 = 15;

                    //sym.$("question4").html(q4);

          }

          if (i==5){

                    q5 = 15;

                    //sym.$("question5").html(q5);

          }

          if (i==6){

                    q6 = 20;

                    //sym.$("question6").html(q6);

          }

          if (i==7){

                    q7 = 20;

                    //sym.$("question7").html(q7);

          }

          var FinalScoreHolder = q1 + q2 + q3 + q4 + q5 +q6 +q7;

          if (i=7){

                    //var FinalScoreHolder = q1 + q2 + q3;

                    sym.$("grade").html("You scored "+FinalScoreHolder+"%");

                    if (FinalScoreHolder >= 90) {

 

 

                    // play the timeline from the given position (ms or label)

                    sym.play("pass");

 

 

                    } else {

 

 

                    // play the timeline from the given position (ms or label)

                    sym.play("fail");

                    }

          }

});

 

 

 

As a side note, this quiz appears at the end of a 8 section mulitmedia learning environment. The code obove is the only code present in the "creationcomplete" window, the rest is done in the timeline.

 

George


Viewing all articles
Browse latest Browse all 9897

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>