Highlighted

how do i reset my point to zero?

Community Beginner ,
Dec 17, 2018

Copy link to clipboard

Copied

hi, how do i reset the point once i goes back to frame 1?

var total:int = 0

totaltext.text = total.toString();

mederma1.addEventListener(MouseEvent.MOUSE_UP, poin)

function poin(event:MouseEvent):void

{

total = total + 25;

totaltext.text=total.toString();

}

Views

79

Likes

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

how do i reset my point to zero?

Community Beginner ,
Dec 17, 2018

Copy link to clipboard

Copied

hi, how do i reset the point once i goes back to frame 1?

var total:int = 0

totaltext.text = total.toString();

mederma1.addEventListener(MouseEvent.MOUSE_UP, poin)

function poin(event:MouseEvent):void

{

total = total + 25;

totaltext.text=total.toString();

}

Views

80

Likes

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
Dec 17, 2018 0
kdmemory LATEST
Advocate ,
Dec 18, 2018

Copy link to clipboard

Copied

Hi arisud

I'm not getting that. In your code snippet is nothing that explains how you go back to frame 1. Are you looping through a number of frames and the playhead hits repeatedly frame 1?

All I can see here is that on each MOUSE_UP on mederma1  your var total gets increased by the number of 25 and that is put into your textfield totalText. (25, 50, 75 .. so what?) Just however it reaches frame 1 put there total = 0;

Or do i do not see something obvious?

klaus

Likes

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
Reply
Loading...
Dec 18, 2018 1