パッケージfl.events
クラスpublic class ScrollEvent
継承ScrollEvent Inheritance Event Inheritance Object

言語バージョン : ActionScript 3.0
Player のバージョン : Flash Player 9.0.28.0

ScrollEvent クラスは、ScrollBar コンポーネントに関連するスクロールイベントを定義します。

関連項目

ScrollBar
ScrollBarDirection
UIComponent


パブリック プロパティ
 プロパティ定義元
 Inheritedbubbles : Boolean
[read-only] イベントがバブリングイベントかどうかを示します。
Event
 Inheritedcancelable : Boolean
[read-only] イベントに関連付けられた動作を回避できるかどうかを示します。
Event
 Inheritedconstructor : Object
特定のオブジェクトインスタンスのクラスオブジェクトまたはコンストラクタ関数への参照です。
Object
 InheritedcurrentTarget : Object
[read-only] イベントリスナーで Event オブジェクトをアクティブに処理しているオブジェクトです。
Event
  delta : Number
[read-only] スクロール位置の変化の大きさを取得します (ピクセル単位)。
ScrollEvent
  direction : String
[read-only] イベントと関連付けられた移動の方向を示す定数値を取得します。
ScrollEvent
 InheritedeventPhase : uint
[read-only] イベントフローの現在の段階です。
Event
  position : Number
[read-only] 現在のスクロール位置を取得します (ピクセル単位)。
ScrollEvent
 Inheritedprototype : Object
[static] クラスまたは関数オブジェクトのプロトタイプオブジェクトへの参照です。
Object
 Inheritedtarget : Object
[read-only] イベントターゲットです。
Event
 Inheritedtype : String
[read-only] イベントのタイプです。
Event
パブリック メソッド
 メソッド定義元
  
ScrollEvent(direction:String, delta:Number, position:Number)
指定されたパラメータで、新しい ScrollEvent オブジェクトを作成します。
ScrollEvent
  
ScrollEvent オブジェクトのコピーを作成して、各パラメータの値を元のパラメータの値と一致するように設定します。
ScrollEvent
 Inherited
formatToString(className:String, ... arguments):String
カスタム Event クラスに toString() メソッドを実装するためのユーティリティ関数です。
Event
 Inherited
オブジェクトに指定されたプロパティが定義されているかどうかを示します。
Object
 Inherited
イベントで preventDefault() が呼び出されたかどうかを確認します。
Event
 Inherited
Object クラスのインスタンスが、パラメータとして指定されたオブジェクトのプロトタイプチェーン内にあるかどうかを示します。
Object
 Inherited
イベントのデフォルトの動作をキャンセルできる場合に、その動作をキャンセルします。
Event
 Inherited
指定されたプロパティが存在し列挙できるかどうかを示します。
Object
 Inherited
ループ処理に対するダイナミックプロパティの可用性を設定します。
Object
 Inherited
イベントフローの現在のノードおよび後続するノードで、イベントリスナーが処理されないようにします。
Event
 Inherited
イベントフローの現在のノードに後続するノードで、イベントリスナーが処理されないようにします。
Event
  
ScrollEvent オブジェクトのすべてのプロパティを含んでいるストリングを返します。
ScrollEvent
 Inherited
指定されたオブジェクトのプリミティブな値を返します。
Object
パブリック 定数
 定数定義元
 InheritedACTIVATE : String = "activate"
[static] activate イベントオブジェクトの type プロパティ値を定義します。
Event
 InheritedADDED : String = "added"
[static] added イベントオブジェクトの type プロパティ値を定義します。
Event
 InheritedADDED_TO_STAGE : String = "addedToStage"
[static] addedToStage イベントオブジェクトの 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
 InheritedFULLSCREEN : String = "fullScreen"
[static] fullScreen イベントオブジェクトの 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
 InheritedREMOVED_FROM_STAGE : String = "removedFromStage"
[static] removedFromStage イベントオブジェクトの type プロパティ値を定義します。
Event
 InheritedRENDER : String = "render"
[static] render イベントオブジェクトの type プロパティ値を定義します。
Event
 InheritedRESIZE : String = "resize"
[static] resize イベントオブジェクトの type プロパティ値を定義します。
Event
  SCROLL : String = "scroll"
[static] scroll イベントオブジェクトの type プロパティ値を定義します。
ScrollEvent
 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
 InheritedUNLOAD : String = "unload"
[static] unload イベントオブジェクトの type プロパティ値を定義します。
Event
プロパティの詳細
deltaプロパティ
delta:Number  [read-only]

言語バージョン : ActionScript 3.0
Player のバージョン : Flash Player 9.0.28.0

スクロール位置の変化の大きさを取得します (ピクセル単位)。スクロールが下方向または右方向に行われた場合は正の値を返します。スクロールが上方向または左方向に行われた場合は負の値を返します。


実装
    public function get delta():Number
directionプロパティ 
direction:String  [read-only]

言語バージョン : ActionScript 3.0
Player のバージョン : Flash Player 9.0.28.0

イベントと関連付けられた移動の方向を示す定数値を取得します。値 ScrollBarDirection.HORIZONTAL は、水平方向の移動を示します。値 ScrollBarDirection.VERTICAL は、垂直方向の移動を示します。


実装
    public function get direction():String

関連項目

positionプロパティ 
position:Number  [read-only]

言語バージョン : ActionScript 3.0
Player のバージョン : Flash Player 9.0.28.0

現在のスクロール位置を取得します (ピクセル単位)。


実装
    public function get position():Number
コンストラクタの詳細
ScrollEvent()コンストラクタ
public function ScrollEvent(direction:String, delta:Number, position:Number)

言語バージョン : ActionScript 3.0
Player のバージョン : Flash Player 9.0.28.0

指定されたパラメータで、新しい ScrollEvent オブジェクトを作成します。

パラメータ
direction:String — イベントと関連付けられた移動の方向です。値 ScrollBarDirection.HORIZONTAL は、水平方向の移動を示します。値 ScrollBarDirection.VERTICAL は、垂直方向の移動を示します。
 
delta:Number — スクロール位置の変化を示します (ピクセル単位)。スクロールが下方向または右方向に行われた場合は正の値を返します。スクロールが上方向または左方向に行われた場合は負の値を返します。
 
position:Number — 現在のスクロール位置を示します。
メソッドの詳細
clone()メソッド
public override function clone():Event

言語バージョン : ActionScript 3.0
Player のバージョン : Flash Player 9.0.28.0

ScrollEvent オブジェクトのコピーを作成して、各パラメータの値を元のパラメータの値と一致するように設定します。

戻り値
Event — 元のオブジェクトと同じパラメータ値を含んでいる新しい ScrollEvent オブジェクトです。
toString()メソッド 
public override function toString():String

言語バージョン : ActionScript 3.0
Player のバージョン : Flash Player 9.0.28.0

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

[ ScrollEvent type= value bubbles= value cancelable= value direction= value delta= value position= value ]

戻り値
String — ScrollEvent オブジェクトのストリング表現です。
定数の詳細
SCROLL定数
public static const SCROLL:String = "scroll"

言語バージョン : ActionScript 3.0
Player のバージョン : Flash Player 9.0.28.0

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

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

プロパティ
bubblesfalse
cancelablefalse は、キャンセルするデフォルトの動作がないことを示します。
currentTargetイベントリスナーで event オブジェクトをアクティブに処理しているオブジェクトです。
delta1。実行されたスクロールの量を示す値です。
directionvertical。ScrollBar の方向です。
position0。ScrollBar サムの移動後の位置です。
targetイベントを送出したオブジェクトです。ターゲットは、必ずしもイベントを受け取るオブジェクトではありません。イベントを受け取るオブジェクトにアクセスするには、currentTarget プロパティを使用します。




次の例では、scroll イベントを監視し、ScrollEvent クラスの direction プロパティを使用して、コンテンツが水平方向にスクロールされたか垂直方向にスクロールされたかを判断します。

import fl.containers.ScrollPane;
import fl.events.ScrollEvent;
import fl.controls.ScrollBarDirection;

var myScrollPane:ScrollPane = new ScrollPane();
myScrollPane.scrollDrag = true;
myScrollPane.source = "http://www.helpexamples.com/flash/images/image1.jpg";
myScrollPane.addEventListener(ScrollEvent.SCROLL, scrollHandler);
addChild(myScrollPane);

function scrollHandler(event:ScrollEvent):void {
    switch (event.direction) {
        case ScrollBarDirection.HORIZONTAL:
            trace("horizontal scroll", event.position, "of", event.currentTarget.maxHorizontalScrollPosition);
            break;
        case ScrollBarDirection.VERTICAL:
            trace("vertical scroll", event.position, "of", event.currentTarget.maxVerticalScrollPosition);
            break;
    }
}




 

このページに新しいコメントが追加された場合に、電子メールでの通知を希望する。 | コメントレポート

現在のページ: http://livedocs.adobe.com/flash/9.0_jp/ActionScriptLangRefV3/fl/events/ScrollEvent.html