| Package | jp.nium.utils |
| Class | public final class MovieClipUtil |
| Method | Defined by | ||
|---|---|---|---|
|
addEnterFrameListener(listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
[static]
Event.ENTER_FRAME のイベントに対してリスナーを登録します。
| MovieClipUtil | ||
|
doLater(scope:*, callBack:Function, ... args):void
[static]
指定された関数を 1 フレーム経過後に実行します。
Execute the specified function, 1 frame later.
| MovieClipUtil | ||
|
frameToLabels(movie:MovieClip, frame:int):Array
[static]
MovieClip インスタンスの指定されたフレーム番号からフレームラベルを保持した配列を取得します。
Get the array which contains the frame label that specified by frame number of the MovieClip instance.
| MovieClipUtil | ||
|
getDistanceFrames(movie:MovieClip, frame1:*, frame2:*):int
[static]
指定された 2 点間のフレーム差を取得します。
Get the frame difference of specified two points.
| MovieClipUtil | ||
|
hasFrame(movie:MovieClip, frame:*):Boolean
[static]
指定したフレームが存在しているかどうかを返します。
Returns if the specified frame exists.
| MovieClipUtil | ||
|
labelToFrames(movie:MovieClip, labelName:String):Array
[static]
MovieClip インスタンスの指定されたフレームラベルからフレーム番号を保持した配列を取得します。
Get the array which contains the frame number that specified by frame label of the MovieClip instance.
| MovieClipUtil | ||
|
playheadWithinFrames(movie:MovieClip, frame1:*, frame2:*):Boolean
[static]
指定されて 2 点間に再生ヘッドが存在しているかどうかを取得します。
Returns if the playback head exists between the specified two points.
| MovieClipUtil | ||
|
removeEnterFrameListener(listener:Function, useCapture:Boolean = false):void
[static]
Event.ENTER_FRAME のイベントに対して登録したリスナーを解除します。
| MovieClipUtil | ||
| addEnterFrameListener | () | method |
public static function addEnterFrameListener(listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):voidEvent.ENTER_FRAME のイベントに対してリスナーを登録します。
Parameterslistener:Function — イベントを処理するリスナー関数です。この関数は Event インスタンスを唯一のパラメータとして受け取り、何も返さないものである必要があります。関数は任意の名前を持つことができます。
The listener function that processes the event. This function must accept an Event object as its only parameter and must return nothing. The function can have any name.
|
|
useCapture:Boolean (default = false) — リスナーが、キャプチャ段階、またはターゲットおよびバブリング段階で動作するかどうかを判断します。useCapture を true に設定すると、リスナーはキャプチャ段階のみでイベントを処理し、ターゲット段階またはバブリング段階では処理しません。useCapture を false に設定すると、リスナーはターゲット段階またはバブリング段階のみでイベントを処理します。3 つの段階すべてでイベントを受け取るには、addEventListener を 2 回呼び出します。useCapture を true に設定して 1 度呼び出し、useCapture を false に設定してもう一度呼び出します。
Determines whether the listener works in the capture phase or the target and bubbling phases. If useCapture is set to true, the listener processes the event only during the capture phase and not in the target or bubbling phase. If useCapture is false, the listener processes the event only during the target or bubbling phase. To listen for the event in all three phases, call addEventListener twice, once with useCapture set to true, then again with useCapture set to false.
|
|
priority:int (default = 0) — イベントリスナーの優先度レベルです。優先度は、符号付き 32 ビット整数で指定します。数値が大きくなるほど優先度が高くなります。優先度が n のすべてのリスナーは、優先度が n -1 のリスナーよりも前に処理されます。複数のリスナーに対して同じ優先度が設定されている場合、それらは追加された順番に処理されます。デフォルトの優先度は 0 です。
The priority level of the event listener. The priority is designated by a signed 32-bit integer. The higher the number, the higher the priority. All listeners with priority n are processed before listeners of priority n-1. If two or more listeners share the same priority, they are processed in the order in which they were added. The default priority is 0.
|
|
useWeakReference:Boolean (default = false) — リスナーへの参照が強参照と弱参照のいずれであるかを判断します。デフォルトである強参照の場合は、リスナーのガベージコレクションが回避されます。弱参照では回避されません。
Determines whether the reference to the listener is strong or weak. A strong reference (the default) prevents your listener from being garbage-collected. A weak reference does not.
|
| doLater | () | method |
public static function doLater(scope:*, callBack:Function, ... args):void指定された関数を 1 フレーム経過後に実行します。 Execute the specified function, 1 frame later.
Parametersscope:* — 関数が実行される際のスコープです。
The scope when the function executes.
|
|
callBack:Function — 実行したい関数です。
The function to execute.
|
|
... args — 関数の実行時の引数です。
The argument of the function when executes.
|
| frameToLabels | () | method |
public static function frameToLabels(movie:MovieClip, frame:int):ArrayMovieClip インスタンスの指定されたフレーム番号からフレームラベルを保持した配列を取得します。 Get the array which contains the frame label that specified by frame number of the MovieClip instance.
Parametersmovie:MovieClip — フレームラベルを取得したい MovieClip インスタンスです。
The MovieClip instance to get the frame number.
|
|
frame:int — フレーム番号です。
The frame number.
|
Array — フレームラベルです。
The frame label.
|
| getDistanceFrames | () | method |
public static function getDistanceFrames(movie:MovieClip, frame1:*, frame2:*):int指定された 2 点間のフレーム差を取得します。 Get the frame difference of specified two points.
Parametersmovie:MovieClip — 対象の MovieClip インスタンスです。
The MovieClip instance to process.
|
|
frame1:* — 最初のフレーム位置です。
The position of the first frame.
|
|
frame2:* — 2 番目のフレーム位置です。
The position of the second frame.
|
int — フレーム差です。
The frame difference.
|
| hasFrame | () | method |
public static function hasFrame(movie:MovieClip, frame:*):Boolean指定したフレームが存在しているかどうかを返します。 Returns if the specified frame exists.
Parametersmovie:MovieClip — 対象の MovieClip インスタンスです。
The MovieClip instance to process.
|
|
frame:* — 存在を確認するフレームです。
The frame to check if exists.
|
Boolean — 存在していれば true 、なければ false です。
Returns true if exists, otherwise return false.
|
| labelToFrames | () | method |
public static function labelToFrames(movie:MovieClip, labelName:String):ArrayMovieClip インスタンスの指定されたフレームラベルからフレーム番号を保持した配列を取得します。 Get the array which contains the frame number that specified by frame label of the MovieClip instance.
Parametersmovie:MovieClip — フレーム番号を取得したい MovieClip インスタンスです。
The MovieClip instance to get the frame number.
|
|
labelName:String — フレームラベルです。
The frame label.
|
Array — フレーム番号です。
The frame number.
|
| playheadWithinFrames | () | method |
public static function playheadWithinFrames(movie:MovieClip, frame1:*, frame2:*):Boolean指定されて 2 点間に再生ヘッドが存在しているかどうかを取得します。 Returns if the playback head exists between the specified two points.
Parametersmovie:MovieClip — 対象の MovieClip インスタンスです。
The MovieClip instance to process.
|
|
frame1:* — 最初のフレーム位置です。
The position of the first frame.
|
|
frame2:* — 2 番目のフレーム位置です。
The position of the second frame.
|
Boolean — 存在していれば true 、なければ false です。
Returns true if exists, otherwise return false.
|
| removeEnterFrameListener | () | method |
public static function removeEnterFrameListener(listener:Function, useCapture:Boolean = false):voidEvent.ENTER_FRAME のイベントに対して登録したリスナーを解除します。
Parameterslistener:Function — 削除するリスナーオブジェクトです。
The listener object to remove.
|
|
useCapture:Boolean (default = false) — リスナーが、キャプチャ段階、またはターゲットおよびバブリング段階に対して登録されたかどうかを示します。リスナーがキャプチャ段階だけでなくターゲット段階とバブリング段階にも登録されている場合は、removeEventListener() を 2 回呼び出して両方のリスナーを削除する必要があります。1 回は useCapture() を true に設定し、もう 1 回は useCapture() を false に設定する必要があります。
Specifies whether the listener was registered for the capture phase or the target and bubbling phases. If the listener was registered for both the capture phase and the target and bubbling phases, two calls to removeEventListener() are required to remove both, one call with useCapture() set to true, and another call with useCapture() set to false.
|