• 締切済み

ParaFlaのアクションスクリプトについてです

ParaFlaのアクションスクリプトについてです 「日付」、「分」、「秒」部分を二桁で表示させ、曜日の部分を日本語にするには下のスクリプトをどのようにすればよいのでしょうか? ( 例)2010/6/01(火)12:00:00 ↑このようにしたいです。 このスクリプトです↓ now_time = ""; //変数の初期化 ("week" & "0") = "Sun"; ("week" & "1") = "Mon"; ("week" & "2") = "Tue"; ("week" & "3") = "Wed"; ("week" & "4") = "Thu"; ("week" & "5") = "Fri"; ("week" & "6") = "Sat"; //曜日用の擬似配列 now_time_yr = FSCommand2("GetDateYear") & "/"; now_time = now_time & now_time_yr; //西暦 now_time_mth = FSCommand2("GetDateMonth") & "/"; now_time = now_time & now_time_mth; //月 now_time_dy = FSCommand2("GetDateDay") & " ("; now_time = now_time & now_time_dy; //日付 wd = FSCommand2("GetDateWeekday"); now_time = now_time & valueOf("week" & wd) & ") "; //曜日 now_time_h = FSCommand2("GetTimeHours") & ":"; now_time = now_time & now_time_h; //時刻 now_time_m = FSCommand2("GetTimeMinutes") & ":"; now_time = now_time & now_time_m; //分 now_time_s = FSCommand2("GetTimeSeconds"); now_time = now_time & now_time_s; //秒

みんなの回答

  • ryupyon
  • ベストアンサー率17% (29/163)
回答No.1

onClipEvent(enterFrame) { n_date = new Date(); now_time = ""; week = ["日", "月", "火", "水", "木", "金", "土"]; now_time = n_date.getFullYear() + "/"; now_time += (n_date.getMonth() + 1)+ "/"; now_time += n_date.getDate() + " ("; now_time += week[n_date.getDay()] + ") "; now_time += n_date.getHours() + ":"; now_time += n_date.getMinutes() + ":"; now_time += n_date.getSeconds(); }

関連するQ&A