Skip to main content
arisud
Participant
December 18, 2018
Question

how do i reset my point to zero?

  • December 18, 2018
  • 1 reply
  • 208 views

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

}

    This topic has been closed for replies.

    1 reply

    kdmemory
    Inspiring
    December 18, 2018

    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