How can I subtract the values obtained by pressing these 2 buttons ?, that is, subtract the "start" to the "end" and get the milliseconds.
var inicio:int;
var fin:int;
var milisec1:int;
var milisec2:int;
btn1.addEventListener(MouseEvent.CLICK,click1);
function click1(e:MouseEvent):void{
var milisec1:Date = new Date();
var inicio = milisec1.getTime();
salida1.text = inicio;
}
btn2.addEventListener(MouseEvent.CLICK,click2);
function click2(e:MouseEvent):void{
var milisec2:Date = new Date();
var fin = milisec2.getTime();
salida2.text = fin;
}