Monday, August 08, 2005

Flash Lite [ 7 ] Date/Time

在Flash Lite裡面不需要建立時間物件,也可以取得系統時間及日期,
利用特定的fscommand2即可,
fscommand2( "GetDateDay" );
fscommand2( "GetDateMonth" );
fscommand2( "GetDateWeekday" );
fscommand2( "GetDateYear" );
fscommand2( "GetLocalTime" , "time" );
fscommand2( "GetTimeHours" );
fscommand2( "GetTimeMinutes" );
fscommand2( "GetTimeSeconds" );
fscommand2( "GetTimeZoneOffset" , "timezoneoffset" );

後面有橘色的要使用,必須使用後面定義的變數,
例如說場景上有個文字欄位data,要放入LocalTime的值,
_root.data=_root.time;

其他的直接使用即可,例如:
_root.data=fscommand2( "GetDateMonth" );

1 comment:

Anonymous said...

看起來很方便耶