| パッケージ | fl.events |
| クラス | public class ScrollEvent |
| 継承 | ScrollEvent Event Object |
| 言語バージョン : | ActionScript 3.0 |
| Player のバージョン : | Flash Player 9.0.28.0 |
関連項目
| プロパティ | 定義元 | ||
|---|---|---|---|
![]() | bubbles : Boolean
[read-only]
イベントがバブリングイベントかどうかを示します。
| Event | |
![]() | cancelable : Boolean
[read-only]
イベントに関連付けられた動作を回避できるかどうかを示します。
| Event | |
![]() | constructor : Object
特定のオブジェクトインスタンスのクラスオブジェクトまたはコンストラクタ関数への参照です。
| Object | |
![]() | currentTarget : Object
[read-only]
イベントリスナーで Event オブジェクトをアクティブに処理しているオブジェクトです。
| Event | |
| delta : Number
[read-only]
スクロール位置の変化の大きさを取得します (ピクセル単位)。
| ScrollEvent | ||
| direction : String
[read-only]
イベントと関連付けられた移動の方向を示す定数値を取得します。
| ScrollEvent | ||
![]() | eventPhase : uint
[read-only]
イベントフローの現在の段階です。
| Event | |
| position : Number
[read-only]
現在のスクロール位置を取得します (ピクセル単位)。
| ScrollEvent | ||
![]() | prototype : Object
[static]
クラスまたは関数オブジェクトのプロトタイプオブジェクトへの参照です。
| Object | |
![]() | target : Object
[read-only]
イベントターゲットです。
| Event | |
![]() | type : String
[read-only]
イベントのタイプです。
| Event | |
| メソッド | 定義元 | ||
|---|---|---|---|
|
指定されたパラメータで、新しい ScrollEvent オブジェクトを作成します。
| ScrollEvent | ||
|
ScrollEvent オブジェクトのコピーを作成して、各パラメータの値を元のパラメータの値と一致するように設定します。
| ScrollEvent | ||
![]() |
カスタム Event クラスに toString() メソッドを実装するためのユーティリティ関数です。
| Event | |
![]() |
オブジェクトに指定されたプロパティが定義されているかどうかを示します。
| Object | |
![]() |
イベントで preventDefault() が呼び出されたかどうかを確認します。
| Event | |
![]() |
Object クラスのインスタンスが、パラメータとして指定されたオブジェクトのプロトタイプチェーン内にあるかどうかを示します。
| Object | |
![]() |
イベントのデフォルトの動作をキャンセルできる場合に、その動作をキャンセルします。
| Event | |
![]() |
指定されたプロパティが存在し列挙できるかどうかを示します。
| Object | |
![]() |
ループ処理に対するダイナミックプロパティの可用性を設定します。
| Object | |
![]() |
イベントフローの現在のノードおよび後続するノードで、イベントリスナーが処理されないようにします。
| Event | |
![]() |
イベントフローの現在のノードに後続するノードで、イベントリスナーが処理されないようにします。
| Event | |
|
ScrollEvent オブジェクトのすべてのプロパティを含んでいるストリングを返します。
| ScrollEvent | ||
![]() |
指定されたオブジェクトのプリミティブな値を返します。
| Object | |
| 定数 | 定義元 | ||
|---|---|---|---|
![]() | ACTIVATE : String = "activate" [static]
activate イベントオブジェクトの type プロパティ値を定義します。
| Event | |
![]() | ADDED : String = "added" [static]
added イベントオブジェクトの type プロパティ値を定義します。
| Event | |
![]() | ADDED_TO_STAGE : String = "addedToStage" [static]
addedToStage イベントオブジェクトの type プロパティ値を定義します。
| Event | |
![]() | CANCEL : String = "cancel" [static]
cancel イベントオブジェクトの type プロパティ値を定義します。
| Event | |
![]() | CHANGE : String = "change" [static]
change イベントオブジェクトの type プロパティ値を定義します。
| Event | |
![]() | CLOSE : String = "close" [static]
close イベントオブジェクトの type プロパティ値を定義します。
| Event | |
![]() | COMPLETE : String = "complete" [static]
complete イベントオブジェクトの type プロパティ値を定義します。
| Event | |
![]() | CONNECT : String = "connect" [static]
connect イベントオブジェクトの type プロパティ値を定義します。
| Event | |
![]() | DEACTIVATE : String = "deactivate" [static]
deactivate イベントオブジェクトの type プロパティ値を定義します。
| Event | |
![]() | ENTER_FRAME : String = "enterFrame" [static]
enterFrame イベントオブジェクトの type プロパティ値を定義します。
| Event | |
![]() | FULLSCREEN : String = "fullScreen" [static]
fullScreen イベントオブジェクトの type プロパティ値を定義します。
| Event | |
![]() | ID3 : String = "id3" [static]
id3 イベントオブジェクトの type プロパティ値を定義します。
| Event | |
![]() | INIT : String = "init" [static]
init イベントオブジェクトの type プロパティの値を定義します。
| Event | |
![]() | MOUSE_LEAVE : String = "mouseLeave" [static]
mouseLeave イベントオブジェクトの type プロパティ値を定義します。
| Event | |
![]() | OPEN : String = "open" [static]
open イベントオブジェクトの type プロパティ値を定義します。
| Event | |
![]() | REMOVED : String = "removed" [static]
removed イベントオブジェクトの type プロパティ値を定義します。
| Event | |
![]() | REMOVED_FROM_STAGE : String = "removedFromStage" [static]
removedFromStage イベントオブジェクトの type プロパティ値を定義します。
| Event | |
![]() | RENDER : String = "render" [static]
render イベントオブジェクトの type プロパティ値を定義します。
| Event | |
![]() | RESIZE : String = "resize" [static]
resize イベントオブジェクトの type プロパティ値を定義します。
| Event | |
| SCROLL : String = "scroll" [static]
scroll イベントオブジェクトの type プロパティ値を定義します。
| ScrollEvent | ||
![]() | SELECT : String = "select" [static]
select イベントオブジェクトの type プロパティ値を定義します。
| Event | |
![]() | SOUND_COMPLETE : String = "soundComplete" [static]
soundComplete イベントオブジェクトの type プロパティ値を定義します。
| Event | |
![]() | TAB_CHILDREN_CHANGE : String = "tabChildrenChange" [static]
tabChildrenChange イベントオブジェクトの type プロパティ値を定義します。
| Event | |
![]() | TAB_ENABLED_CHANGE : String = "tabEnabledChange" [static]
tabEnabledChange イベントオブジェクトの type プロパティ値を定義します。
| Event | |
![]() | TAB_INDEX_CHANGE : String = "tabIndexChange" [static]
tabIndexChange イベントオブジェクトの type プロパティ値を定義します。
| Event | |
![]() | UNLOAD : 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 イベントオブジェクト) の値を定義します。
このイベントには、次のプロパティがあります。
| プロパティ | 値 |
|---|---|
bubbles | false |
cancelable | false は、キャンセルするデフォルトの動作がないことを示します。 |
currentTarget | イベントリスナーで event オブジェクトをアクティブに処理しているオブジェクトです。 |
delta | 1。実行されたスクロールの量を示す値です。
|
direction | vertical。ScrollBar の方向です。 |
position | 0。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