パッケージflash.events
public class TimerEvent
継承TimerEvent Inheritance Event Inheritance Object

Timer オブジェクトが、Timer.delay プロパティによって指定された時間間隔に達すると、Flash® Player によって TimerEvent オブジェクトが送出されます。

例の表示

関連項目

flash.utils.Timer


パブリックプロパティ
 プロパティ定義
 Inheritedbubbles : Boolean
イベントがバブリングイベントかどうかを示します。
Event
 Inheritedcancelable : Boolean
イベントに関連付けられたビヘイビアを回避できるかどうかを示します。
Event
 Inheritedconstructor : Object
特定のオブジェクトインスタンスのクラスオブジェクトまたはコンストラクタ関数への参照です。
Object
 InheritedcurrentTarget : Object
イベントリスナーで Event オブジェクトをアクティブに処理しているオブジェクトです。
Event
 InheritedeventPhase : uint
イベントフローの現在の段階です。
Event
 Inheritedprototype : Object
[static] クラスまたは関数オブジェクトのプロトタイプオブジェクトへの参照です。
Object
 Inheritedtarget : Object
イベントターゲットです。
Event
 Inheritedtype : String
イベントの型です。
Event
パブリックメソッド
 メソッド定義
  TimerEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false)
timer イベントに関する特定の情報を含む Event オブジェクトを作成します。
TimerEvent
  clone():Event
TimerEvent オブジェクトのコピーを作成して、各プロパティの値を元のプロパティの値と一致するように設定します。
TimerEvent
 InheritedformatToString(className:String, ... arguments):String
カスタム Event クラスに toString() メソッドを実装するためのユーティリティ関数です。
Event
 InheritedhasOwnProperty(name:String):Boolean
オブジェクトに指定されたプロパティが定義されているかどうかを示します。
Object
 InheritedisDefaultPrevented():Boolean
イベントで preventDefault() が呼び出されたかどうかをチェックします。
Event
 InheritedisPrototypeOf(theClass:Object):Boolean
Object クラスのインスタンスが、パラメータとして指定されたオブジェクトのプロトタイプチェーン内にあるかどうかを示します。
Object
 InheritedpreventDefault():void
イベントのデフォルトビヘイビアをキャンセルできる場合に、そのビヘイビアをキャンセルします。
Event
 InheritedpropertyIsEnumerable(name:String):Boolean
指定されたプロパティが存在し、列挙可能かどうかを示します。
Object
 InheritedsetPropertyIsEnumerable(name:String, isEnum:Boolean = true):void
ループ処理に対するダイナミックプロパティの可用性を設定します。
Object
 InheritedstopImmediatePropagation():void
イベントフローの現在のノードおよび後続するノードで、イベントリスナーが処理されないようにします。
Event
 InheritedstopPropagation():void
イベントフローの現在のノードに後続するノードで、イベントリスナーが処理されないようにします。
Event
  toString():String
TimerEvent オブジェクトのすべてのプロパティを含むストリングを返します。
TimerEvent
  updateAfterEvent():void
表示リストが変更されている場合は、このイベント終了処理の後にレンダリングするよう Flash Player に指示します。
TimerEvent
 InheritedvalueOf():Object
指定されたオブジェクトのプリミティブ値を返します。
Object
パブリック定数
 定数定義
 InheritedACTIVATE : String = "activate"
[static] activate イベントオブジェクトの type プロパティの値を定義します。
Event
 InheritedADDED : String = "added"
[static] added イベントオブジェクトの type プロパティの値を定義します。
Event
 InheritedCANCEL : String = "cancel"
[static] cancelイベントオブジェクトの type プロパティの値を定義します。
Event
 InheritedCHANGE : String = "change"
[static] change イベントオブジェクトの type プロパティの値を定義します。
Event
 InheritedCLOSE : String = "close"
[static] close イベントオブジェクトの type プロパティの値を定義します。
Event
 InheritedCOMPLETE : String = "complete"
[static] complete イベントオブジェクトの type プロパティの値を定義します。
Event
 InheritedCONNECT : String = "connect"
[static] connect イベントオブジェクトの type プロパティの値を定義します。
Event
 InheritedDEACTIVATE : String = "deactivate"
[static] deactivate イベントオブジェクトの type プロパティの値を定義します。
Event
 InheritedENTER_FRAME : String = "enterFrame"
[static] enterFrame イベントオブジェクトの type プロパティの値を定義します。
Event
 InheritedID3 : String = "id3"
[static] id3 イベントオブジェクトの type プロパティの値を定義します。
Event
 InheritedINIT : String = "init"
[static] init イベントオブジェクトの type プロパティの値を定義します。
Event
 InheritedMOUSE_LEAVE : String = "mouseLeave"
[static] mouseLeave イベントオブジェクトの type プロパティの値を定義します。
Event
 InheritedOPEN : String = "open"
[static] open イベントオブジェクトの type プロパティの値を定義します。
Event
 InheritedREMOVED : String = "removed"
[static] removed イベントオブジェクトの type プロパティの値を定義します。
Event
 InheritedRENDER : String = "render"
[static] render イベントオブジェクトの type プロパティの値を定義します。
Event
 InheritedRESIZE : String = "resize"
[static] resize イベントオブジェクトの type プロパティの値を定義します。
Event
 InheritedSCROLL : String = "scroll"
[static] scroll イベントオブジェクトの type プロパティの値を定義します。
Event
 InheritedSELECT : String = "select"
[static] select イベントオブジェクトの type プロパティの値を定義します。
Event
 InheritedSOUND_COMPLETE : String = "soundComplete"
[static] soundComplete イベントオブジェクトの type プロパティの値を定義します。
Event
 InheritedTAB_CHILDREN_CHANGE : String = "tabChildrenChange"
[static] tabChildrenChange イベントオブジェクトの type プロパティの値を定義します。
Event
 InheritedTAB_ENABLED_CHANGE : String = "tabEnabledChange"
[static] tabEnabledChange イベントオブジェクトの type プロパティの値を定義します。
Event
 InheritedTAB_INDEX_CHANGE : String = "tabIndexChange"
[static] tabIndexChange イベントオブジェクトの type プロパティの値を定義します。
Event
  TIMER : String = "timer"
[static] timer イベントオブジェクトの type プロパティの値を定義します。
TimerEvent
  TIMER_COMPLETE : String = "timerComplete"
[static] timerComplete イベントオブジェクトの type プロパティの値を定義します。
TimerEvent
 InheritedUNLOAD : String = "unload"
[static] unload イベントオブジェクトの type プロパティの値を定義します。
Event
コンストラクタの詳細
TimerEvent()コンストラクタ
public 関数 TimerEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false)

timer イベントに関する特定の情報を含む Event オブジェクトを作成します。イベントリスナーには Event オブジェクトがパラメータとして渡されます。

パラメータ
type:String — イベントのタイプです。イベントリスナーは、継承された type プロパティを通じてこの情報にアクセスできます。
 
bubbles:Boolean (default = false) — Event オブジェクトでバブリングを実行できるかどうかを判断します。イベントリスナーは、継承された bubbles プロパティを通じてこの情報にアクセスできます。
 
cancelable:Boolean (default = false) — Event オブジェクトがキャンセル可能かどうかを判断します。イベントリスナーは、継承された cancelable プロパティを通じてこの情報にアクセスできます。
メソッドの詳細
clone()メソッド
public override function clone():Event

TimerEvent オブジェクトのコピーを作成して、各プロパティの値を元のプロパティの値と一致するように設定します。

戻り値
Event — 元のオブジェクトと同じプロパティ値を含む新しい TimerEvent オブジェクトです。
toString()メソッド 
public override function toString():String

TimerEvent オブジェクトのすべてのプロパティを含むストリングを返します。ストリングは次の形式です。

[TimerEvent type=value bubbles=value cancelable=value]

戻り値
String — TimerEvent オブジェクトのすべてのプロパティを含むストリングです。
updateAfterEvent()メソッド 
public function updateAfterEvent():void

表示リストが変更されている場合は、このイベント終了処理の後にレンダリングするよう Flash Player に指示します。

定数の詳細
TIMER定数
public static const TIMER:String = "timer"

timer イベントオブジェクトの type プロパティの値を定義します。

このイベントには、次のプロパティがあります。

プロパティ
bubblesfalse
cancelablefalse は、キャンセルするデフォルトの動作がないことを示します。
currentTargetイベントリスナーで Event オブジェクトをアクティブに処理しているオブジェクトです。
target時間間隔が経過した Timer オブジェクトです。

関連項目

TIMER_COMPLETE定数 
public static const TIMER_COMPLETE:String = "timerComplete"

timerComplete イベントオブジェクトの type プロパティの値を定義します。

このイベントには、次のプロパティがあります。

プロパティ
bubblesfalse
cancelablefalse は、キャンセルするデフォルトの動作がないことを示します。
currentTargetイベントリスナーで Event オブジェクトをアクティブに処理しているオブジェクトです。
target要求を完了した Timer オブジェクトです。

関連項目


次の例では、TimerExample クラスを使用して、 リスナーメソッド timerHandler() をインスタンス化し、送出される新しい TimerEvent を受け取るように設定する方法を示します。 送出が行われるのは、Timer の start() メソッドが呼び出されたときです。
package {
    import flash.utils.Timer;
    import flash.events.TimerEvent;
    import flash.display.Sprite;

    public class TimerEventExample extends Sprite {

        public function TimerEventExample() {
            var myTimer:Timer = new Timer(1000, 2);
            myTimer.addEventListener(TimerEvent.TIMER, timerHandler);
            myTimer.start();
        }

        public function timerHandler(event:TimerEvent):void {
            trace("timerHandler: " + event);
        }
    }
}