| Package | jp.progression.core.commands |
| Class | public class Command |
| Inheritance | Command EventIntegrator flash.events.EventDispatcher |
| Subclasses | AddChild, AddChildAt, AddChildAtAbove, Break, CommandList, DoSound, DoTransition, DoTween, DoTweener, DoTweenFrame, Func, Goto, Listen, LoadChild, LoadChildAt, LoadChildAtAbove, LoadObject, LoadURL, Prop, RemoveAllChildren, RemoveChild, Trace, UnloadChild, UnloadObject, Wait |
| Property | Defined By | ||
|---|---|---|---|
| className : String [read-only]
インスタンスのクラス名を取得します。
Indicates the instance className of the Command.
| Command | ||
| defaultTimeOut : int [static] | Command | ||
| delay : int
コマンド実行までの遅延時間(ミリ秒)を取得または設定します。
| Command | ||
| enabled : Boolean
コマンドが実行可能かどうかを取得または設定します。
この値を false に設定した状態で execute() メソッドを実行すると、何も処理を行わずに CommandEvent.COMMAND_COMPLETE イベントを送出します。
| Command | ||
| enforcedInterrupting : Boolean [read-only]
コマンドが強制中断処理中かどうかを取得します。
| Command | ||
| extra : Object [read-only]
execute() メソッド実行時に引数として指定されたオブジェクトを取得します。
このコマンドが親の CommandList インスタンスによって実行されている場合には、親の extra オブジェクトの内容をコマンド実行順にリレーする形で引き継ぎます。
| Command | ||
| group : String
インスタンスのグループ名を取得または設定します。
Indicates the instance group of the Command.
| Command | ||
| id : String
インスタンスの識別子を取得または設定します。
Indicates the instance id of the Command.
| Command | ||
| interrupting : Boolean [read-only]
コマンドが中断処理中かどうかを取得します。
| Command | ||
| latestData : *
CommandList 上で、自身より前に実行された外部データ読み込み系のコマンドが持っている外部データを取得します。
| Command | ||
| length : int [read-only]
コマンドの深度を取得します。
| Command | ||
| name : String
インスタンスの名前を取得または設定します。
Indicates the instance name of the Command.
| Command | ||
| next : Command [read-only]
このコマンドが CommandList インスタンスに関連付けられている場合に、次に位置するコマンドを取得します。
| Command | ||
| parent : CommandList [read-only]
このコマンドを子に含んでいる親の CommandList インスタンスを取得します。
| Command | ||
| previous : Command [read-only]
このコマンドが CommandList インスタンスに関連付けられている場合に、前に位置するコマンドを取得します。
| Command | ||
| root : Command [read-only]
コマンドツリー構造の一番上に位置するコマンドを取得します。
| Command | ||
| running : Boolean [read-only]
コマンドが実行中かどうかを取得します。
| Command | ||
| scope : Object
コマンド実行処理、および中断処理のタイムアウト時間(ミリ秒)を取得または設定します。
指定された時間中に executeComplete() メソッド、もしくは interruptComplete() が実行されなかった場合にエラーが送出されます。
この値が 0 に設定されている場合、タイムアウトは発生しません。
| Command | ||
| thresholdLength : int [static] | Command | ||
| timeOut : int
コマンド実行処理、および中断処理のタイムアウト時間(ミリ秒)を取得または設定します。
指定された時間中に executeComplete() メソッド、もしくは interruptComplete() が実行されなかった場合にエラーが送出されます。
この値が 0 に設定されている場合、タイムアウトは発生しません。
| Command | ||
| Method | Defined By | ||
|---|---|---|---|
Command(executeFunction:Function = null, interruptFunction:Function = null, initObject:Object = null)
新しい Command インスタンスを作成します。
Creates a new Command object.
| Command | ||
![]() | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void [override]
イベントリスナーオブジェクトを EventIntegrator インスタンスに登録し、リスナーがイベントの通知を受け取るようにします。
このメソッドを使用して登録されたリスナーを removeEventListener() メソッドで削除した場合には、restoreRemovedListeners() メソッドで再登録させることができます。
Register the event listener object into the EventIntegrator instance to get the event notification. | EventIntegrator | |
![]() | addExclusivelyEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
イベントリスナーオブジェクトを EventIntegrator インスタンスに登録し、リスナーがイベントの通知を受け取るようにします。
このメソッドを使用して登録されたリスナーは、IEventIntegrator インスタンスの管理外となるため、removeEventListener() メソッドで削除した場合にも、restoreRemovedListeners() メソッドで再登録させることができません。
Register the event listener object into the EventIntegrator instance to get the event notification. | EventIntegrator | |
コマンドの実行完了直後に処理させたい関数を設定します。
関数実行時の this 参照は実行しているコマンドインスタンスになります。
| Command | ||
コマンドに対してすぐに関数を実行します。
関数実行時の this 参照は実行しているコマンドインスタンスになります。
| Command | ||
コマンドの実行直前に処理させたい関数を設定します。
関数実行時の this 参照は実行しているコマンドインスタンスになります。
| Command | ||
Command インスタンスのコピーを作成して、各プロパティの値を元のプロパティの値と一致するように設定します。
Duplicates an instance of an Command subclass.
| Command | ||
![]() | completelyRemoveEventListener(type:String, listener:Function, useCapture:Boolean = false):void
EventIntegrator インスタンスからリスナーを削除します。
このメソッドを使用して削除されたリスナーは、restoreRemovedListeners() メソッドで再登録させることができません。
Remove the listener from EventIntegrator instance. | EventIntegrator | |
![]() | dispatchEvent(event:Event):Boolean [override]
イベントをイベントフローに送出します。
Dispatches an event into the event flow.
| EventIntegrator | |
コマンド実行中に例外エラーが発生した場合に呼び出される関数を設定します。
関数実行時の this 参照はエラーが発生したコマンドインスタンスになります。
| Command | ||
execute(extra:Object = null):void
コマンドを実行します。
| Command | ||
executeComplete():void
実行中のコマンド処理が完了したことを通知します。
このメソッドを実行するためには、事前に execute() メソッドが実行されている必要があります。
| Command | ||
getCommandById(id:String):Command
指定された id と同じ値が設定されている Command インスタンスを返します。
| Command | ||
getCommandsByGroup(group:String, sort:Boolean = false):Array
指定された group と同じ値を持つ Command インスタンスを含む配列を返します。
| Command | ||
getCommandsByRegExp(fieldName:String, pattern:RegExp, sort:Boolean = false):Array
指定された fieldName が条件と一致する Command インスタンスを含む配列を返します。
| Command | ||
![]() | hasEventListener(type:String):Boolean [override]
EventIntegrator インスタンスに、特定のイベントタイプに対して登録されたリスナーがあるかどうかを確認します。
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
| EventIntegrator | |
interrupt(enforced:Boolean = false, extra:Object = null):void
コマンド処理を中断します。
このメソッドを実行するためには、事前に execute() メソッドが実行されている必要があります。
| Command | ||
interruptComplete():void
実行中のコマンド中断処理が完了したことを通知します。
このメソッドを実行するためには、事前に interrupt() メソッドが実行されている必要があります。
| Command | ||
コマンド実行中にイベントが発生した場合に呼び出されるリスナー関数を設定します。
| Command | ||
![]() | removeAllListeners(completely:Boolean = false):void
addEventListener() メソッド経由で登録された全てのイベントリスナー登録を削除します。
完全に登録を削除しなかった場合には、削除されたイベントリスナーを restoreRemovedListeners() メソッドで復帰させることができます。
Remove the whole event listener registered via addEventListener() method. | EventIntegrator | |
![]() | removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void [override]
EventIntegrator インスタンスからリスナーを削除します。
このメソッドを使用して削除されたリスナーは、restoreRemovedListeners() メソッドで再登録させることができます。
Remove the listener from EventIntegrator instance. | EventIntegrator | |
![]() | restoreRemovedListeners():void
removeEventListener() メソッド、または removeAllListeners() メソッド経由で削除された全てイベントリスナーを再登録します。
Re-register the whole event listener removed via removeEventListener() or removeAllListeners() method.
| EventIntegrator | |
setProperties(props:Object):Command
コマンドに対して、複数のプロパティを一括設定します。
| Command | ||
toString():String [override]
指定されたオブジェクトのストリング表現を返します。
Returns the string representation of the specified object.
| Command | ||
![]() | willTrigger(type:String):Boolean [override]
指定されたイベントタイプについて、この EventIntegrator インスタンスまたはその祖先にイベントリスナーが登録されているかどうかを確認します。
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
| EventIntegrator | |
| Method | Defined By | ||
|---|---|---|---|
_catchError(target:Command, error:Error):void
コマンド処理でエラーが発生した場合の処理を行います。
エラー処理が発生すると、コマンド処理が停止します。
問題を解決し、通常フローに戻す場合には executeComplete() メソッドを、問題が解決されない為に中断処理を行いたい場合には interrupt() メソッドを実行してください。
関数内で問題が解決、または中断処理に移行しなかった場合には CommandEvent.COMMAND_ERROR イベントが送出されます。
関数実行時の this 参照は実行しているコマンドインスタンスになります。
| Command | ||
| Event | Summary | Defined By | ||
|---|---|---|---|---|
| コマンドがコマンドリストに追加された場合に送出されます。 | Command | |||
| コマンドの処理が完了した場合に送出されます。 | Command | |||
| コマンド処理中にエラーが発生した場合に送出されます。 | Command | |||
| コマンドの処理を停止した場合に送出されます。 | Command | |||
| コマンドがコマンドリストから削除された場合に送出されます。 | Command | |||
| コマンドの処理が開始された場合に送出されます。 | Command | |||
| __length | property |
__length:int progression_internal function get __length():int progression_internal function set __length(value:int):void| __next | property |
__next:Command progression_internal function get __next():Command progression_internal function set __next(value:Command):void| __parent | property |
__parent:CommandList progression_internal function get __parent():CommandList progression_internal function set __parent(value:CommandList):void| __previous | property |
__previous:Command progression_internal function get __previous():Command progression_internal function set __previous(value:Command):void| __root | property |
__root:Command progression_internal function get __root():Command progression_internal function set __root(value:Command):void| className | property |
className:String [read-only] インスタンスのクラス名を取得します。 Indicates the instance className of the Command.
public function get className():String| defaultTimeOut | property |
defaultTimeOut:int public static function get defaultTimeOut():int public static function set defaultTimeOut(value:int):void| delay | property |
delay:intコマンド実行までの遅延時間(ミリ秒)を取得または設定します。
public function get delay():int public function set delay(value:int):void| enabled | property |
enabled:Booleanコマンドが実行可能かどうかを取得または設定します。 この値を false に設定した状態で execute() メソッドを実行すると、何も処理を行わずに CommandEvent.COMMAND_COMPLETE イベントを送出します。
public function get enabled():Boolean public function set enabled(value:Boolean):void| enforcedInterrupting | property |
enforcedInterrupting:Boolean [read-only] コマンドが強制中断処理中かどうかを取得します。
public function get enforcedInterrupting():Boolean| extra | property |
extra:Object [read-only] execute() メソッド実行時に引数として指定されたオブジェクトを取得します。 このコマンドが親の CommandList インスタンスによって実行されている場合には、親の extra オブジェクトの内容をコマンド実行順にリレーする形で引き継ぎます。
public function get extra():Object| group | property |
group:Stringインスタンスのグループ名を取得または設定します。 Indicates the instance group of the Command.
public function get group():String public function set group(value:String):void| id | property |
id:Stringインスタンスの識別子を取得または設定します。 Indicates the instance id of the Command.
public function get id():String public function set id(value:String):void| interrupting | property |
interrupting:Boolean [read-only] コマンドが中断処理中かどうかを取得します。
public function get interrupting():Boolean| latestData | property |
latestData:*CommandList 上で、自身より前に実行された外部データ読み込み系のコマンドが持っている外部データを取得します。
public function get latestData():* public function set latestData(value:any):void| length | property |
length:int [read-only] コマンドの深度を取得します。
public function get length():int| name | property |
name:Stringインスタンスの名前を取得または設定します。 Indicates the instance name of the Command.
public function get name():String public function set name(value:String):void| next | property |
next:Command [read-only] このコマンドが CommandList インスタンスに関連付けられている場合に、次に位置するコマンドを取得します。
public function get next():Command| parent | property |
parent:CommandList [read-only] このコマンドを子に含んでいる親の CommandList インスタンスを取得します。
public function get parent():CommandList| previous | property |
previous:Command [read-only] このコマンドが CommandList インスタンスに関連付けられている場合に、前に位置するコマンドを取得します。
public function get previous():Command| root | property |
root:Command [read-only] コマンドツリー構造の一番上に位置するコマンドを取得します。
public function get root():Command| running | property |
running:Boolean [read-only] コマンドが実行中かどうかを取得します。
public function get running():Boolean| scope | property |
scope:Objectコマンド実行処理、および中断処理のタイムアウト時間(ミリ秒)を取得または設定します。 指定された時間中に executeComplete() メソッド、もしくは interruptComplete() が実行されなかった場合にエラーが送出されます。 この値が 0 に設定されている場合、タイムアウトは発生しません。
public function get scope():Object public function set scope(value:Object):void| thresholdLength | property |
thresholdLength:int public static function get thresholdLength():int public static function set thresholdLength(value:int):void| timeOut | property |
timeOut:intコマンド実行処理、および中断処理のタイムアウト時間(ミリ秒)を取得または設定します。 指定された時間中に executeComplete() メソッド、もしくは interruptComplete() が実行されなかった場合にエラーが送出されます。 この値が 0 に設定されている場合、タイムアウトは発生しません。
public function get timeOut():int public function set timeOut(value:int):void| Command | () | Constructor |
public function Command(executeFunction:Function = null, interruptFunction:Function = null, initObject:Object = null)新しい Command インスタンスを作成します。 Creates a new Command object.
ParametersexecuteFunction:Function (default = null) — コマンドの実行関数です。
| |
interruptFunction:Function (default = null) — コマンドの中断関数です。
| |
initObject:Object (default = null) — 設定したいプロパティを含んだオブジェクトです。
|
| _catchError | () | method |
protected function _catchError(target:Command, error:Error):voidコマンド処理でエラーが発生した場合の処理を行います。 エラー処理が発生すると、コマンド処理が停止します。 問題を解決し、通常フローに戻す場合には executeComplete() メソッドを、問題が解決されない為に中断処理を行いたい場合には interrupt() メソッドを実行してください。 関数内で問題が解決、または中断処理に移行しなかった場合には CommandEvent.COMMAND_ERROR イベントが送出されます。 関数実行時の this 参照は実行しているコマンドインスタンスになります。
Parameters
target:Command | |
error:Error |
| after | () | method |
public function after(afterFunction:Function, ... afterArgs):Commandコマンドの実行完了直後に処理させたい関数を設定します。 関数実行時の this 参照は実行しているコマンドインスタンスになります。
Parameters
afterFunction:Function — 実行させたい関数です。
| |
... afterArgs — 関数実行時に引数として使用したい配列です。
|
Command —
自身の参照です。
|
| apply | () | method |
public function apply(applyFunction:Function, ... applyArgs):Commandコマンドに対してすぐに関数を実行します。 関数実行時の this 参照は実行しているコマンドインスタンスになります。
Parameters
applyFunction:Function — 実行させたい関数です。
| |
... applyArgs — 関数実行時に引数として使用したい配列です。
|
Command —
自身の参照です。
|
| before | () | method |
public function before(beforeFunction:Function, ... beforeArgs):Commandコマンドの実行直前に処理させたい関数を設定します。 関数実行時の this 参照は実行しているコマンドインスタンスになります。
Parameters
beforeFunction:Function — 実行させたい関数です。
| |
... beforeArgs — 関数実行時に引数として使用したい配列です。
|
Command —
自身の参照です。
|
| clone | () | method |
public function clone():CommandCommand インスタンスのコピーを作成して、各プロパティの値を元のプロパティの値と一致するように設定します。 Duplicates an instance of an Command subclass.
ReturnsCommand —
元のオブジェクトと同じプロパティ値を含む新しい Command インスタンスです。
A new Command object that is identical to the original.
|
| error | () | method |
public function error(errorFunction:Function):Commandコマンド実行中に例外エラーが発生した場合に呼び出される関数を設定します。 関数実行時の this 参照はエラーが発生したコマンドインスタンスになります。
Parameters
errorFunction:Function — 実行させたい関数です。
|
Command —
自身の参照です。
|
| execute | () | method |
public function execute(extra:Object = null):voidコマンドを実行します。
Parameters
extra:Object (default = null) — 実行時にコマンドフローをリレーするオブジェクトです。
|
| executeComplete | () | method |
public function executeComplete():void実行中のコマンド処理が完了したことを通知します。 このメソッドを実行するためには、事前に execute() メソッドが実行されている必要があります。
| getCommandById | () | method |
public function getCommandById(id:String):Command指定された id と同じ値が設定されている Command インスタンスを返します。
Parameters
id:String — 条件となるストリングです。
|
Command —
条件と一致するインスタンスです。
|
| getCommandsByGroup | () | method |
public function getCommandsByGroup(group:String, sort:Boolean = false):Array指定された group と同じ値を持つ Command インスタンスを含む配列を返します。
Parameters
group:String — 条件となるストリングです。
| |
sort:Boolean (default = false) — 配列をソートするかどうかを指定します。
|
Array —
条件と一致するインスタンスです。
|
| getCommandsByRegExp | () | method |
public function getCommandsByRegExp(fieldName:String, pattern:RegExp, sort:Boolean = false):Array指定された fieldName が条件と一致する Command インスタンスを含む配列を返します。
Parameters
fieldName:String — 調査するフィールド名です。
| |
pattern:RegExp — 条件となる正規表現です。
| |
sort:Boolean (default = false) — 配列をソートするかどうかを指定します。
|
Array —
条件と一致するインスタンスです。
|
| interrupt | () | method |
public function interrupt(enforced:Boolean = false, extra:Object = null):voidコマンド処理を中断します。 このメソッドを実行するためには、事前に execute() メソッドが実行されている必要があります。
Parameters
enforced:Boolean (default = false) — 現在実行中のコマンド以降の中断処理を無視して、強制的に中断するかどうかです。
| |
extra:Object (default = null) — 実行時にコマンドフローをリレーするオブジェクトです。
|
| interruptComplete | () | method |
public function interruptComplete():void実行中のコマンド中断処理が完了したことを通知します。 このメソッドを実行するためには、事前に interrupt() メソッドが実行されている必要があります。
| listen | () | method |
public function listen(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0):Commandコマンド実行中にイベントが発生した場合に呼び出されるリスナー関数を設定します。
Parameters
type:String — イベントのタイプです。
| |
listener:Function — イベントを処理するリスナー関数です。この関数は Event インスタンスを唯一のパラメータとして受け取り、何も返さないものである必要があります。関数は任意の名前を持つことができます。
| |
useCapture:Boolean (default = false) — リスナーが、キャプチャ段階、またはターゲットおよびバブリング段階で動作するかどうかを判断します。useCapture を true に設定すると、リスナーはキャプチャ段階のみでイベントを処理し、ターゲット段階またはバブリング段階では処理しません。useCapture を false に設定すると、リスナーはターゲット段階またはバブリング段階のみでイベントを処理します。3 つの段階すべてでイベントを受け取るには、addEventListener を 2 回呼び出します。useCapture を true に設定して 1 度呼び出し、useCapture を false に設定してもう一度呼び出します。
| |
priority:int (default = 0) — イベントリスナーの優先度レベルです。優先度は、符号付き 32 ビット整数で指定します。数値が大きくなるほど優先度が高くなります。優先度が n のすべてのリスナーは、優先度が n -1 のリスナーよりも前に処理されます。複数のリスナーに対して同じ優先度が設定されている場合、それらは追加された順番に処理されます。デフォルトの優先度は 0 です。
|
Command —
自身の参照です。
|
| setProperties | () | method |
public function setProperties(props:Object):Commandコマンドに対して、複数のプロパティを一括設定します。
Parameters
props:Object — 設定したいプロパティを含んだオブジェクトです。
|
Command —
設定対象の Command インスタンスです。
|
| toString | () | method |
override public function toString():String指定されたオブジェクトのストリング表現を返します。 Returns the string representation of the specified object.
ReturnsString —
オブジェクトのストリング表現です。
A string representation of the object.
|
| commandAdded | Event |
jp.progression.events.CommandEventjp.progression.events.CommandEvent.COMMAND_ADDEDコマンドがコマンドリストに追加された場合に送出されます。
commandAdded イベントオブジェクトの type プロパティ値を定義します。 The CommandEvent.COMMAND_ADDED constant defines the value of the type property of an commandAdded event object.| commandComplete | Event |
jp.progression.events.CommandEventjp.progression.events.CommandEvent.COMMAND_COMPLETEコマンドの処理が完了した場合に送出されます。
commandComplete イベントオブジェクトの type プロパティ値を定義します。 The CommandEvent.COMMAND_COMPLETE constant defines the value of the type property of an commandComplete event object.| commandError | Event |
jp.progression.events.CommandEventjp.progression.events.CommandEvent.COMMAND_ERRORコマンド処理中にエラーが発生した場合に送出されます。
commandError イベントオブジェクトの type プロパティ値を定義します。 The CommandEvent.COMMAND_ERROR constant defines the value of the type property of an commandError event object.| commandInterrupt | Event |
jp.progression.events.CommandEventjp.progression.events.CommandEvent.COMMAND_INTERRUPTコマンドの処理を停止した場合に送出されます。
commandInterrupt イベントオブジェクトの type プロパティ値を定義します。 The CommandEvent.COMMAND_INTERRUPT constant defines the value of the type property of an commandInterrupt event object.| commandRemoved | Event |
jp.progression.events.CommandEventjp.progression.events.CommandEvent.COMMAND_REMOVEDコマンドがコマンドリストから削除された場合に送出されます。
commandRemoved イベントオブジェクトの type プロパティ値を定義します。 The CommandEvent.COMMAND_REMOVED constant defines the value of the type property of an commandRemoved event object.| commandStart | Event |
jp.progression.events.CommandEventjp.progression.events.CommandEvent.COMMAND_STARTコマンドの処理が開始された場合に送出されます。
commandStart イベントオブジェクトの type プロパティ値を定義します。 The CommandEvent.COMMAND_START constant defines the value of the type property of an commandStart event object.