Я новичок в Adobe Animate и сценариях действий, поэтому я действительно не знаю, как это исправить.
Я создаю тест mcq, который выглядит следующим образом: если пользователь выбирает ответ a или b или c или d. если правильный ответ, поставьте 1 балл, выберите неправильный ответ 0 баллов
Источник двух ошибок - скорость функции.
Вот код, который я сделал до сих пор ...
import flash.events.Event;
import flash.events.EventDispatcher;
stop();
question.text="the question is"
var totalscore=3;
var currentscore=0;
function mark()
{
currentscore = currentscore + 1;
}
/* Click to Go to Scene and Play
Clicking on the specified symbol instance plays the movie from the specified scene and frame.
Instructions:
1. Replace "Scene 3" with the name of the scene you would like play.
2. Replace 1 with the frame number you would like the movie to play from in the specified scene.
*/
ans1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToScene_24);
function fl_ClickToGoToScene_24(event:MouseEvent):void
{
MovieClip(this.root).gotoAndPlay(1, "quiz 2");
currentscore = currentscore + 1;
}
ans2.addEventListener(MouseEvent.CLICK, fl_ClickToGoToScene_24);
function fl_ClickToGoToScene_24(event:MouseEvent):void
{
MovieClip(this.root).gotoAndPlay(1, "quiz 2");
currentscore = currentscore + 0;
}
ans3.addEventListener(MouseEvent.CLICK, fl_ClickToGoToScene_24);
function fl_ClickToGoToScene_24(event:MouseEvent):void
{
MovieClip(this.root).gotoAndPlay(1, "quiz 2");
currentscore = currentscore + 0;
}
ans4.addEventListener(MouseEvent.CLICK, fl_ClickToGoToScene_24);
function fl_ClickToGoToScene_24(event:MouseEvent):void
{
MovieClip(this.root).gotoAndPlay(1, "quiz 2");
currentscore = currentscore + 0;
}
stop();