Packagejp.progression.commands.lists
Classpublic class LoaderList
InheritanceLoaderList Inheritance SerialList Inheritance CommandList Inheritance Command Inheritance flash.events.EventDispatcher
ImplementsILoadable

LoaderList クラスは、複数の ILoadable インターフェイスを実装したコマンドをまとめて管理するためのコマンドリストクラスです。


Example
  // LoaderList インスタンスを作成する
  var list:LoaderList = new LoaderList();
  
  // イベントハンドラメソッドを設定する
  list.onStart = function():void {
   trace( "読み込みを開始" );
  };
  list.onProgress = function():void {
   trace( this.percent, "%", this.loaded, "/", this.total );
  };
  list.onComplete = function():void {
   trace( "読み込んだデータ =", this.data );
  };
  
  // 読み込み処理を設定する
  list.addCommand(
   new LoadURL( new URLRequest( "example.xml" ) ),
   new LoadBitmapData( new URLRequest( "example.png" ) ),
   new LoadSWF( new URLRequest( "example.swf" ) )
  );
  
  // コマンドを実行する
  list.execute();
  



Public Properties
 PropertyDefined by
  bytesLoaded : uint
[read-only] コマンドの読み込み済みのバイト数です。 The number of bytes that are loaded for the command.
LoaderList
  bytesTotal : uint
[read-only] コマンド全体の圧縮後のバイト数です。 The number of compressed bytes in the entire command.
LoaderList
 InheritedcatchError : Function
コマンドの実行中に例外が発生した際に実行するエラー処理関数を取得または設定します。
Command
 InheritedclassName : String
インスタンスのクラス名を取得します。 Indicates the instance className of the Command.
Command
 Inheritedcommands : Array
子コマンドインスタンスが保存されている配列です。 この配列を操作することで元の配列を変更することはできません。
CommandList
  data : *
読み込み操作によって受信したデータです。 The data received from the load operation.
LoaderList
 InheriteddefaultInterruptType : int
[static] interruptType プロパティの初期値を取得または設定します。 すでに生成済みのコマンドに対しては適用されません。
Command
 InheriteddefaultTimeout : Number
[static] timeout プロパティの初期値を取得または設定します。 すでに生成済みのコマンドに対しては適用されません。
Command
 Inheriteddelay : Number
コマンドが実際に実行されるまでの遅延時間を取得または設定します。 コマンド実行中に値を変更しても、処理に対して反映されません。
Command
 Inheriteddepth : int
コマンドツリー構造上での自身の深度を取得します。
Command
 Inheritedextra : Object
コマンドの実行処理、または中断処理の開始時に指定されているリレーオブジェクトを取得または設定します。 このコマンドが親の CommandList インスタンスによって実行されている場合には、親のリレーオブジェクトを順々に引き継ぎます。
Command
  factor : Number
percent プロパティの算出時の自身の重要性を取得または設定します。
LoaderList
 Inheritedgroup : String
インスタンスのグループ名を取得または設定します。 Indicates the instance group of the Command.
Command
 Inheritedid : String
インスタンスを表すユニークな識別子を取得または設定します。
Command
 InheritedinterruptType : int
中断処理時の処理方法を取得または設定します。 コマンド実行中に値を変更しても、処理に対して反映されません。
Command
  latestData : *
自身から見て最後に関連付けられた読み込みデータを取得または設定します。 このコマンドインスタンスが CommandList インスタンス上に存在する場合には、自身より前、または自身の親のデータを取得します。
LoaderList
  loaded : uint
[read-only] 登録されている ILoadable を実装したインスタンスの内、すでに読み込み処理が完了した数を取得します。
LoaderList
 Inheritedname : String
インスタンスの名前を取得または設定します。 Indicates the instance name of the Command.
Command
 Inheritednext : Command
このコマンドが関連付けられている親の CommandList インスタンス内で、次に位置する Command インスタンスを取得します。
Command
 InheritednumCommands : int
子として登録されているコマンド数を取得します。
CommandList
 InheritedonComplete : Function
コマンドオブジェクトが ExecuteEvent.EXECUTE_COMPLETE イベントを受け取った場合に呼び出されるイベントハンドラメソッドを取得または設定します。
Command
 InheritedonError : Function
コマンドオブジェクトが ExecuteErrorEvent.EXECUTE_ERROR イベントを受け取った場合に呼び出されるイベントハンドラメソッドを取得または設定します。
Command
 InheritedonInterrupt : Function
コマンドオブジェクトが ExecuteEvent.EXECUTE_INTERRUPT イベントを受け取った場合に呼び出されるイベントハンドラメソッドを取得または設定します。
Command
 InheritedonPosition : Function
コマンドオブジェクトが ExecuteEvent.EXECUTE_POSITION イベントを受け取った場合に呼び出されるイベントハンドラメソッドを取得または設定します。
SerialList
  onProgress : Function
コマンドオブジェクトが ProgressEvent.PROGRESS イベントを受け取った場合に呼び出されるイベントハンドラメソッドを取得または設定します。
LoaderList
 InheritedonStart : Function
コマンドオブジェクトが ExecuteEvent.EXECUTE_START イベントを受け取った場合に呼び出されるイベントハンドラメソッドを取得または設定します。
Command
 Inheritedparent : CommandList
この Command オブジェクトを含む CommandList オブジェクトを示します。 Indicates the CommandList object that contains this Command object.
Command
  percent : Number
[read-only] loaded プロパティと total プロパティから算出される読み込み状態をパーセントで取得します。
LoaderList
 Inheritedposition : int
現在処理しているコマンド位置を取得または設定します。
CommandList
 Inheritedprevious : Command
このコマンドが関連付けられている親の CommandList インスタンス内で、一つ前に位置する Command インスタンスを取得します。
Command
 Inheritedroot : Command
コマンドツリー構造の一番上に位置する Command インスタンスを取得します。
Command
 Inheritedscope : Object
コマンドの実行処理、または中断処理に指定されている関数内でのスコープ対象を取得または設定します。
Command
 Inheritedstate : int
コマンドの実行状態を取得します。
Command
  target : ILoadable
[read-only] 現在の読み込み対象を取得します。
LoaderList
 InheritedthresholdLength : int
[static] 同一プロセス上で実行可能な最大コマンド数を取得または設定します。 設定された閾値を超えて実行された場合には、強制的に 1 ミリ秒の遅延を発生させます。 この値が大きすぎる場合、スタックオーバーフローが発生する可能性があります。
Command
 Inheritedtimeout : Number
コマンドの実行中のタイムアウト時間を取得または設定します。 指定された時間中に executeComplete() メソッド、または interrupt() メソッドが実行されなかった場合にはエラーが送出されます。 この値が 0 に設定されている場合、タイムアウト処理は発生しません。
Command
  total : uint
[read-only] 登録されている ILoadable を実装したインスタンスの総数を取得します。
LoaderList
Public Methods
 MethodDefined by
  
LoaderList(initObject:Object = null, ... commands)
新しい LoaderList インスタンスを作成します。 Creates a new LoaderList object.
LoaderList
 Inherited
addCommand(... commands):void
登録されているコマンドの最後尾に新しくコマンドを追加します。 関数を指定した場合には、自動的に Func コマンドに変換され、 数値を指定した場合には、自動的に Wait コマンドに変換され、 配列を指定した場合には、自動的に ParallelList コマンドに変換され、 それ以外の値は、全て自動的に Trace コマンドに変換されます。
SerialList
 Inherited
clearCommand(completely:Boolean = false):void
コマンドインスタンスをリストから削除します。
CommandList
  
LoaderList インスタンスのコピーを作成して、各プロパティの値を元のプロパティの値と一致するように設定します。 Duplicates an instance of an LoaderList subclass.
LoaderList
  
dispose():void
保持しているデータを解放します。
LoaderList
  
execute(extra:Object = null):void
コマンドインスタンスを実行します。
LoaderList
  
実行中のコマンド処理が完了したことを通知します。 このメソッドを実行するためには、事前に execute() メソッドが実行されている必要があります。
LoaderList
 Inherited
getCommandAt(index:int):Command
指定のインデックス位置にある子 Command インスタンスオブジェクトを返します。 Returns the child Command instance that exists at the specified index.
CommandList
 Inherited
getCommandIndex(command:Command):int
指定された名前に一致する子 Command インスタンスを返します。 Returns the child Command that exists with the specified name.
CommandList
 Inherited
insertCommand(... commands):void
現在実行中のコマンドの次の位置に新しくコマンドを追加します。 関数を指定した場合には、自動的に Func コマンドに変換され、 数値を指定した場合には、自動的に Wait コマンドに変換され、 配列を指定した場合には、自動的に ParallelList コマンドに変換され、 それ以外の値は、全て自動的に Trace コマンドに変換されます。
SerialList
 Inherited
interrupt(enforced:Boolean = false):void
コマンド処理を中断します。 このメソッドを実行するためには、事前に execute() メソッドが実行されている必要があります。
SerialList
 Inherited
setProperties(parameters:Object):Command
インスタンスに対して、複数のプロパティを一括設定します。
Command
  
toString():String
指定されたオブジェクトのストリング表現を返します。 Returns the string representation of the specified object.
LoaderList
Protected Methods
 MethodDefined by
 Inherited
hasNextCommand():Boolean
次のコマンドインスタンスが存在するかどうかを返します。
CommandList
 Inherited
次のコマンドインスタンスを取得して、処理位置を次に進めます。
CommandList
 Inherited
reset():void
コマンドの処理位置を最初に戻します。
CommandList
 Inherited
throwError(target:Command, error:Error):void
コマンド処理中に例外が発生したことを通知します。 エラー処理が発生すると、コマンド処理が停止します。 問題を解決し、通常フローに戻す場合には executeComplete() メソッドを、問題が解決されず中断処理を行いたい場合には interrupt() メソッドを実行してください。 関数内で問題が解決、または中断処理に移行しなかった場合には ExecuteEvent.ERROR イベントが送出されます。
CommandList
Events
 EventSummaryDefined by
 Inherited 処理が完了した場合に送出されます。 Command
 Inherited 処理の途中でエラーが発生した場合に送出されます。 Command
 Inherited 処理が中断された場合に送出されます。 Command
 Inherited リストに登録されているコマンドの実行処理位置が変更された場合に送出されます。 SerialList
 Inherited 処理が開始された場合に送出されます。 Command
   ダウンロード処理を実行中にデータを受信したときに送出されます。 LoaderList
Property detail
bytesLoadedproperty
bytesLoaded:uint  [read-only]

コマンドの読み込み済みのバイト数です。 The number of bytes that are loaded for the command.

Implementation
    public function get bytesLoaded():uint
bytesTotalproperty 
bytesTotal:uint  [read-only]

コマンド全体の圧縮後のバイト数です。 The number of compressed bytes in the entire command.

Implementation
    public function get bytesTotal():uint
dataproperty 
data:*  [read-write]

読み込み操作によって受信したデータです。 The data received from the load operation.

Implementation
    public function get data():*
    public function set data(value:*):void
factorproperty 
factor:Number  [read-write]

percent プロパティの算出時の自身の重要性を取得または設定します。

Implementation
    public function get factor():Number
    public function set factor(value:Number):void

See also

latestDataproperty 
latestData:*  [read-write]

自身から見て最後に関連付けられた読み込みデータを取得または設定します。 このコマンドインスタンスが CommandList インスタンス上に存在する場合には、自身より前、または自身の親のデータを取得します。

Implementation
    public function get latestData():*
    public function set latestData(value:*):void
loadedproperty 
loaded:uint  [read-only]

登録されている ILoadable を実装したインスタンスの内、すでに読み込み処理が完了した数を取得します。

Implementation
    public function get loaded():uint
onProgressproperty 
onProgress:Function  [read-write]

コマンドオブジェクトが ProgressEvent.PROGRESS イベントを受け取った場合に呼び出されるイベントハンドラメソッドを取得または設定します。

Implementation
    public function get onProgress():Function
    public function set onProgress(value:Function):void

See also

scope
flash.events.ProgressEvent.PROGRESS
percentproperty 
percent:Number  [read-only]

loaded プロパティと total プロパティから算出される読み込み状態をパーセントで取得します。

Implementation
    public function get percent():Number

See also

targetproperty 
target:ILoadable  [read-only]

現在の読み込み対象を取得します。

Implementation
    public function get target():ILoadable
totalproperty 
total:uint  [read-only]

登録されている ILoadable を実装したインスタンスの総数を取得します。

Implementation
    public function get total():uint
Constructor detail
LoaderList()constructor
public function LoaderList(initObject:Object = null, ... commands)

新しい LoaderList インスタンスを作成します。 Creates a new LoaderList object.

Parameters
initObject:Object (default = null)設定したいプロパティを含んだオブジェクトです。
 
... commands登録したいコマンドインスタンス、関数、数値、配列などを含む配列です。
Method detail
clone()method
public override function clone():Command

LoaderList インスタンスのコピーを作成して、各プロパティの値を元のプロパティの値と一致するように設定します。 Duplicates an instance of an LoaderList subclass.

Returns
Command元のオブジェクトと同じプロパティ値を含む新しい LoaderList インスタンスです。 A new LoaderList object that is identical to the original.
dispose()method 
public override function dispose():void

保持しているデータを解放します。

execute()method 
public override function execute(extra:Object = null):void

コマンドインスタンスを実行します。

Parameters
extra:Object (default = null)実行時に設定されるリレーオブジェクトです。

See also

executeComplete()method 
public override function executeComplete():void

実行中のコマンド処理が完了したことを通知します。 このメソッドを実行するためには、事前に execute() メソッドが実行されている必要があります。

See also

toString()method 
public override function toString():String

指定されたオブジェクトのストリング表現を返します。 Returns the string representation of the specified object.

Returns
Stringオブジェクトのストリング表現です。 A string representation of the object.
Event detail
progressevent 
Event object type: flash.events.ProgressEvent

ダウンロード処理を実行中にデータを受信したときに送出されます。