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();
}
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