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

score and lives -games actionscript 3.0

New Here ,
May 19, 2017 May 19, 2017

hi, anyone can help me..

how to increase score if correct answer and minus score if wrong answer with coding action script 3.0

[Moved from the Lounge (which is where you can "connect with your peers" from across all of Adobe's products for conversations that don't directly relate to help and support) to a product-specific support forum - moderator]

TOPICS
ActionScript
2.5K
Translate
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

correct answers 1 Correct answer

Community Expert , May 19, 2017 May 19, 2017
Translate
Community Expert ,
May 19, 2017 May 19, 2017
Translate
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
New Here ,
May 20, 2017 May 20, 2017

thank you a lot, its very helpful..

I have another question..

i make 1 simple games and i want to know how can i continue the score to another "label timeline"?

Translate
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 ,
May 19, 2017 May 19, 2017

use a variable to track the score, a variable for the amount to adjust the score for a correct answer and a third variable for the amount to adjust the score for an incorrect answer.  eg,

var score:int = 0;

var correctInc:int = 10;

var incorrectInc:int = -5;

you can then use something like:

function scoreF(b:Boolean):void{

if(b){

score+=correctInc;

} else {

score+=incorrectInc;

}

Translate
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
New Here ,
May 20, 2017 May 20, 2017
LATEST

Hi, PLEASE HELP ME.....

do you think my coding is OK?

this score cannot function on another timeline *label*...

var total:int = 0;

myScore.text = total.toString();

blink_btn.addEventListener(MouseEvent.CLICK,fl_MouseClickHandler);

function fl_MouseClickHandler(event:MouseEvent):void

{

  total = total + 1;

  myScore.text = total.toString();

}

ignore_btn.addEventListener(MouseEvent.CLICK,fl_MouseClickHandler_2);

function fl_MouseClickHandler_2(event:MouseEvent):void

{

  total = total - 1;

  myScore.text = total.toString();

}

Translate
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