アクセシビリティ

Flash TechNote

Date オブジェクトの不具合が改善されました。

Date オブジェクトを使用すると、Flash Player を実行しているオペレーティングシステムの日時、世界時 (グリニッジ標準時、現在、協定世界時と呼ばれている) の値を調べることができます。

Flash の Date オブジェクトのメソッドは JavaScript の Date(日付) オブジェクトと同じです。

Flash の Date オブジェクトで以下の不具合が確認されておりましたが、現在ダウンロードできる Flash Player 5.0 r 41 (プラグイン)、5.0 r 42 (Active X) でいくつかの問題が改善されました。

  • getHours
    タイムゾーンが日本に設定されている Windows 環境で夏時間が適用される 4 月~ 10 月の間、「現在の時間 + 1 時間」の値が返される。
    改善されております。
  • getUTCHours
    タイムゾーンが日本に設定されている Macintosh 環境で夏時間が適用される 4 月~ 10 月の間、「現在の協定世界時 - 1 時間」の値が返される。
    改善されております。
  • getTimezoneOffset
    タイムゾーンが日本に設定されている Windows および Macintosh 環境で夏時間が適用される 4 月~ 10 月の間、「現在の協定世界時のミリ秒 - 60 ミリ秒」の値が返される。
    改善されております。
  • getMilliseconds、getUTCMilliseconds
    Macintosh 環境では、getMilliseconds、getUTCMillisecondsで返ってくる値が常に 0 になる。
    改善されておりません。

 

 

Flash の Date オブジェクト


To view this demo, you need the latest version of the Macromedia Flash Player.
Download the free Macromedia Flash Player now.

Get Macromedia Flash Player



上記の Flashムービー の Date オブジェクトのソース
wDay = new Array("日", "月", "火", "水", "木", "金", "土");
NowDate = new Date();
mFullYear = NowDate.getFullYear()+"年";
mMonth = NowDate.getMonth()+1+"月";
mDate = NowDate.getDate()+"日";
mDay = wDay[NowDate.getDay()]+"曜日";
mHours = NowDate.getHours()+"時";
mMinutes = NowDate.getMinutes()+"分";
mSeconds = NowDate.getSeconds()+"秒";
mMilliseconds = NowDate.getMilliseconds();
mUTCFullYear = NowDate.getUTCFullYear()+"年";
mUTCMonth = NowDate.getUTCMonth()+1+"月";
mUTCDate = NowDate.getUTCDate()+"日";
mUTCDay = wDay[NowDate.getUTCDay()]+"曜日";
mUTCHours = NowDate.getUTCHours()+"時";
mUTCMinutes = NowDate.getUTCMinutes()+"分";
mUTCSeconds = NowDate.getUTCSeconds()+"秒";
mUTCMilliseconds = NowDate.getUTCMilliseconds();
mTimezone = NowDate.getTimezoneOffset();

ID: fl0151
Product: Flash
Versions: 5
OS: All
Browser: N/A
Server: N/A
Database: N/A
Former ID: N/A