今日はActionscriptの自主勉強♪
初心者なので簡単な日付を取得するスクリプトを使ってみました。
なかなか楽しい!
【覚書き Actionscript】
onClipEvent (enterFrame) {
getdate = new Date();
_root.DATA = getdate.getFullYear()+" / ";
if(getdate.getMonth()<10){
_root.DATA += "0";
}
_root.DATA += getdate.getMonth()+1+" / ";
if(getdate.getDate()<10){
_root.DATA += "0";
}
_root.DATA += getdate.getDate()+" / ";
if(getdate.getHours()<10){
_root.DATA += "0";
}
_root.DATA += getdate.getHours()+":";
if(getdate.getMinutes()<10){
_root.DATA += "0";
}
_root.DATA += getdate.getMinutes()+":";
if(getdate.getSeconds()<10){
_root.DATA += "0";
}
_root.DATA += getdate.getSeconds();
}