Highlighted

## Quiz - Retry Action with Counter and If statement

Community Beginner ,
Apr 28, 2019

Copied

Hi Happy Easter!

I want to make a counter for a Quiz I'm preparing. I want to do this in Frame, where the wrong answer to the question will be given, (Frame 61) becomes the 1st counter of 0. And in the frame that shows the result, that is, that the answer is wrong (Frame 64), I want press a (Retry) button and return to the original Frame of Question (Frame 61). If you can help me. (I have no errors)

My code in Frame 61:

var count = 0;

function correct(event:MouseEvent):void {

gotoAndStop(64);

}

function wrong(event:MouseEvent):void {

gotoAndStop(68);

count = 1;

}

stop();

My code in Frame 64:

gotoAndStop(72);

}

function retry(event:MouseEvent):void {

if(count == 1) {

gotoAndPlay(61);

} else {

gotoAndStop(72);

}

}

stop();

use:

code in Frame 61:

var count;

function correct(event:MouseEvent):void {

gotoAndStop(64);

}

function wrong(event:MouseEvent):void {

count++;

gotoAndStop(68);

}

stop();

code in Frame 68

gotoAndStop(72);

}

function retry(event:MouseEvent):void {

if(count == 1) {

gotoAndPlay(61);

} else {

gotoAndStop(72);

}

}

stop();

Views

96

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

## Quiz - Retry Action with Counter and If statement

Community Beginner ,
Apr 28, 2019

Copied

Hi Happy Easter!

I want to make a counter for a Quiz I'm preparing. I want to do this in Frame, where the wrong answer to the question will be given, (Frame 61) becomes the 1st counter of 0. And in the frame that shows the result, that is, that the answer is wrong (Frame 64), I want press a (Retry) button and return to the original Frame of Question (Frame 61). If you can help me. (I have no errors)

My code in Frame 61:

var count = 0;

function correct(event:MouseEvent):void {

gotoAndStop(64);

}

function wrong(event:MouseEvent):void {

gotoAndStop(68);

count = 1;

}

stop();

My code in Frame 64:

gotoAndStop(72);

}

function retry(event:MouseEvent):void {

if(count == 1) {

gotoAndPlay(61);

} else {

gotoAndStop(72);

}

}

stop();

use:

code in Frame 61:

var count;

function correct(event:MouseEvent):void {

gotoAndStop(64);

}

function wrong(event:MouseEvent):void {

count++;

gotoAndStop(68);

}

stop();

code in Frame 68

gotoAndStop(72);

}

function retry(event:MouseEvent):void {

if(count == 1) {

gotoAndPlay(61);

} else {

gotoAndStop(72);

}

}

stop();

Views

97

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Apr 28, 2019 1
7 Replies 7
Apr 28, 2019

Copied

when the answer's wrong, you go to frame 68, not 64.  it's not clear what's on frame 68 but obviously that's the issue.

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Apr 28, 2019 0
Community Beginner ,
Apr 29, 2019

Copied

Check again. The retry_btn is in frame 68.

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Apr 29, 2019 0
Apr 29, 2019

Copied

when on frame 61

if you answer correctly and then click retry does your app work as expected?

if you answer incorrectly and then click retry does your app work as expected?

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Apr 29, 2019 0
Community Beginner ,
Apr 29, 2019

Copied

My next_q button to go next question is working. But i want to give a second chance if i get the wrong answer to try again, but only once in every question.
For retry_btn i don't know how i can to do to work.

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Apr 29, 2019 0
Apr 30, 2019

Copied

use:

code in Frame 61:

var count;

function correct(event:MouseEvent):void {

gotoAndStop(64);

}

function wrong(event:MouseEvent):void {

count++;

gotoAndStop(68);

}

stop();

code in Frame 68

gotoAndStop(72);

}

function retry(event:MouseEvent):void {

if(count == 1) {

gotoAndPlay(61);

} else {

gotoAndStop(72);

}

}

stop();

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Apr 30, 2019 2
Community Beginner ,
Apr 30, 2019

Copied

I find it...Thanks for help!

Frame 61:

var count:int;

function correct(event:MouseEvent):void

{

gotoAndStop(64);

}

function wrong(event:MouseEvent):void

{

count++;

if(count == 1)

{

gotoAndStop(67);

} else {

gotoAndStop(70);

}

}

stop();

Frame 64:

{

gotoAndStop(73);

}

stop();

Frame 67:

{

gotoAndPlay(61);

}

stop();

Frame 70:

{

gotoAndStop(73);

}

stop();

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Apr 30, 2019 0
LATEST
Apr 30, 2019