samedi 10 décembre 2016

how to getTime in actionscript 3

i need your help. I a beginner in actionscript 3 and I want to convert code form as2 to as3. I want you to chek that mycode is corectly. can you help me, please

here is the code,

timeFaktor = 4;

function timeReset() {
    delete curretnTime;
    delete showtTime;
    currentTime = new Date();
    showTime = new Date();
    startingTime = false;
    pauseTime = 0;
    txt_Time.text = "t = "+0+" s";
}

function moveTime() {
    delete currentTime;
    currentTime = new Date();
    if (!startingTime) {
        starTime = currentTime.getTime();
        startingTime= true;
    }
    newTime = Number(currentTime.getTime()-starTimeMulai)+Number(pauseTime);
    secon = newSecon/1000;
    time = (Math.round(detik*100))/100;
    txt_time.text = "t = "+time+" s";
}

Aucun commentaire:

Enregistrer un commentaire