« こんな大根・・・ | メイン

FLASHでお遊び

今日は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();
}

トラックバック

このエントリーのトラックバックURL:
http://www.style-free.biz/cgi/mt/mt-tb.cgi/58

About

2008年07月09日 17:48に投稿されたエントリーのページです。

ひとつ前の投稿は「こんな大根・・・」です。

他にも多くのエントリーがあります。メインページアーカイブページも見てください。