-1
GETTIME我想代碼AS2轉換爲AS3。如何在ActionScript 3
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";
}
_「我要你檢查我的代碼是正確的......」 _什麼** **究竟是我們檢查?告訴我們,你試圖讓&問一個** **具體問題有關您的代碼的問題...... –
這是正確的,如果它做你想讓它什麼AS3版本代碼。但是,因爲你還沒有描述你想要它做的那麼我們不能回答這個問題的。至於AS2到AS3,我沒有看到你的代碼,任何會被這兩個版本之間的不同,但AS2是很久以前的我,所以我不能肯定。但也有在你的代碼中沒有明顯的語法錯誤,我可以看到。 –