How to insert a timer in a text box?

I have such code:
btn_play.addEventListener(MouseEvent.CLICK playyer);
btn_stop.addEventListener(MouseEvent.CLICK, stopper);
var tiktak: String = "clock is ticking";
var netik: String = "pause";
current_txtf.text = tiktak;

function stopper (event:MouseEvent):void
 btn_stop.visible = false;
 btn_play.visible = true;
 current_txtf.text = netik;

playyer function (event:MouseEvent):void
 btn_stop.visible = true;
 btn_play.visible = false;
 current_txtf.text = tiktak;

It's two buttons play and pause and text fields.
How is labels: the clock is ticking to make a working timer, and freeze it when you press the stop button?
October 3rd 19 at 01:59
1 answer
October 3rd 19 at 02:01

you need a procedure that will run on a timer or thread. don't really know what your JAPANESE, but it looks like JavaScript.
For JS you need to create a function that will inkrementirovanie counter and print it in box.
In playyer, instead of modifying the variable, you need to write code to start the timer, setTimeout or setInterval. And stopper need to write a call to clearTimeout or clearInterval. There are nuances that the timer is again restarted at its functions. Better yet, help to read examples about Finkle.

Thank you. I have the Action Script language. For some reason the site cut off all tags except Flash - arlo_Pfeff commented on October 3rd 19 at 02:04
I roughly understand the logic ) - arlo_Pfeff commented on October 3rd 19 at 02:07

Find more questions by tags Adobe Flash