• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

gotoAndStop() function

Explorer ,
Mar 02, 2022 Mar 02, 2022

Copy link to clipboard

Copied

please help...

so i have made my own button which simply take you to next frame

on the next frame i have made a movieclip symbol inside that i have a simple classic tween.

 

but when button clicked it will take you to the next frame but movieclip does not work.

 

Views

143

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 03, 2022 Mar 03, 2022

Copy link to clipboard

Copied

Hi.

 

Can you provide some screenshots so we can understand what's going on?

 

Regards,

JC

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 03, 2022 Mar 03, 2022

Copy link to clipboard

Copied

this is my code.

 

 

stop();
var total: int = 0;

totaltext.text = total.toString();

opt01.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler);

function fl_MouseClickHandler(event: MouseEvent): void {
total = total + 10;
totaltext.text = total.toString();

opt01.removeEventListener(MouseEvent.CLICK, fl_MouseClickHandler);
}

opt02.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_4);

function fl_MouseClickHandler_4(event: MouseEvent): void {
total = total - 2;
totaltext.text = total.toString();

opt02.removeEventListener(MouseEvent.CLICK, fl_MouseClickHandler_4);
}

opt03.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_5);

function fl_MouseClickHandler_5(event: MouseEvent): void {
total = total - 2;
totaltext.text = total.toString();
opt03.removeEventListener(MouseEvent.CLICK, fl_MouseClickHandler_5);

}

opt04.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_6);

function fl_MouseClickHandler_6(event: MouseEvent): void {
total = total - 2;
totaltext.text = total.toString();

opt04.removeEventListener(MouseEvent.CLICK, fl_MouseClickHandler_6);
}


//---------------------------------------------------------------------------//


opt0201.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_7);

function fl_MouseClickHandler_7(event: MouseEvent): void {
total = total - 2;
totaltext.text = total.toString();

opt0201.removeEventListener(MouseEvent.CLICK, fl_MouseClickHandler_7);

}


opt0202.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_8);

function fl_MouseClickHandler_8(event: MouseEvent): void {
total = total - 2;
totaltext.text = total.toString();

opt0202.removeEventListener(MouseEvent.CLICK, fl_MouseClickHandler_8);

}


opt0203.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_2);

function fl_MouseClickHandler_2(event: MouseEvent): void {
total = total + 10;
totaltext.text = total.toString();

opt0203.removeEventListener(MouseEvent.CLICK, fl_MouseClickHandler_2);

}


opt0204.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_9);

function fl_MouseClickHandler_9(event: MouseEvent): void {
total = total - 2;
totaltext.text = total.toString();

opt0204.removeEventListener(MouseEvent.CLICK, fl_MouseClickHandler_9);
}


next.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_3);

function fl_MouseClickHandler_3(event: MouseEvent): void {
if (total >= 13) {
gotoAndStop(2);
} else if (total < 13) {
gotoAndStop(3);
}
else {
trace("Complete All Questions")
}
}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 03, 2022 Mar 03, 2022

Copy link to clipboard

Copied

LATEST

in the image "01"

i want the number from highlighted textbox to the highlighted textbox in image"02"

Votes

Translate

Translate

Report

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