Packagejp.progression.casts
Classpublic class CastSprite
InheritanceCastSprite Inheritance ExSprite Inheritance flash.display.Sprite
Implementsjp.progression.core.impls.ICastObject, jp.progression.core.impls.IManageable

CastSprite クラスは、ExSprite クラスの基本機能を拡張し、イベントフローとの連携機能を実装した jp.progression パッケージで使用される基本的な表示オブジェクトクラスです。


Example
  // CastSprite インスタンスを作成する
  var cast:CastSprite = new CastSprite();
  cast.graphics.beginFill( 0x000000 );
  cast.graphics.drawRect( 0, 0, 100, 100 );
  cast.graphics.endFill();
  
  // 画面設置時のイベントを設定する
  cast.onCastAdded = function():void {
   trace( "表示されました" );
  };
  cast.onCastRemoved = function():void {
   trace( "消去されました" );
  };
  
  // SerialList コマンドを実行する
  new SerialList( null,
   // 画面に表示する
   new AddChild( this, cast ),
   
   // 画面から消去する
   new RemoveChild( this, cast )
  ).execute();
  

See also

jp.progression.casts.getInstanceById()
jp.progression.casts.getInstancesByGroup()


Public Properties
 PropertyDefined by
 Inheritedchildren : Array
子ディスプレイオブジェクトが保存されている配列です。 インデックス値が断続的に指定可能であるため、getChildAt() ではなくこのプロパティを使用して子ディスプレイオブジェクト走査を行います。 この配列を操作することで元の配列を変更することはできません。 The array that saves child display objects.
ExSprite
 InheritedclassName : String
インスタンスのクラス名を取得します。 Indicates the instance className of the IExDisplayObject.
ExSprite
  contextMenu : ContextMenu
このオブジェクトに関連付けられたコンテキストメニューを指定します。 Specifies the context menu associated with this object.
CastSprite
  executor : ExecutorObject
[read-only] 関連付けられている ExecutorObject インスタンスを取得します。
CastSprite
 Inheritedgroup : String
インスタンスのグループ名を取得または設定します。 Indicates the instance group of the IExDisplayObject.
ExSprite
 Inheritedid : String
インスタンスの識別子を取得または設定します。 Indicates the instance id of the IExDisplayObject.
ExSprite
 InheritedisDragging : Boolean
startDrag() メソッドを使用したドラッグ処理を行っている最中かどうかを取得します。 Returns if the drag process which uses startDrag() method is executing.
ExSprite
  manager : Progression
[read-only] 関連付けられている Progression インスタンスを取得します。
CastSprite
  onCastAdded : Function
キャストオブジェクトが CastEvent.CAST_ADDED イベントを受け取った場合に呼び出されるイベントハンドラメソッドを取得または設定します。 このイベント処理の実行中には、ExecutorObject を使用した非同期処理が行えます。
CastSprite
  onCastRemoved : Function
キャストオブジェクトが CastEvent.CAST_REMOVED イベントを受け取った場合に呼び出されるイベントハンドラメソッドを取得または設定します。 このイベント処理の実行中には、ExecutorObject を使用した非同期処理が行えます。
CastSprite
  self : CastSprite
[read-only] 自身の参照を取得します。
CastSprite
  toolTip : IToolTip
関連付けられている IToolTip インスタンスを取得します。
CastSprite
 InheriteduseChildIndexer : Boolean
ExSprite
Public Methods
 MethodDefined by
  
CastSprite(initObject:Object = null)
新しい CastSprite インスタンスを作成します。 Creates a new CastSprite object.
CastSprite
 Inherited
addChild(child:DisplayObject):DisplayObject
この DisplayObjectContainer インスタンスに子 DisplayObject インスタンスを追加します。 Adds a child DisplayObject instance to this DisplayObjectContainer instance.
ExSprite
 Inherited
addChildAt(child:DisplayObject, index:int):DisplayObject
この DisplayObjectContainer インスタンスの指定されたインデックス位置に子 DisplayObject インスタンスを追加します。 Adds a child DisplayObject instance to this DisplayObjectContainer instance.
ExSprite
 Inherited
addChildAtAbove(child:DisplayObject, index:int):DisplayObject
この DisplayObjectContainer インスタンスの指定されたインデックス位置に子 DisplayObject インスタンスを追加します。 Adds a child DisplayObject instance to this DisplayObjectContainer instance.
ExSprite
  
addCommand(... commands):void
特定のイベントが送出された際に、自動実行させたい Command インスタンスをリストの最後尾に追加します。 追加された Command インスタンスは、イベントが送出される直前に自動的に初期化されます。 このメソッドを使用するためには executor プロパティに CommandExecutor が実装されている必要があります。
CastSprite
  
clearCommand(completely:Boolean = false):void
登録されている Command インスタンスを削除します。 このメソッドを使用するためには executor プロパティに CommandExecutor が実装されている必要があります。
CastSprite
  
dispose():void
保持しているデータを解放します。
CastSprite
 Inherited
getChildAt(index:int):DisplayObject
指定のインデックス位置にある子表示オブジェクトオブジェクトを返します。 Returns the child display object instance that exists at the specified index.
ExSprite
 Inherited
getChildIndex(child:DisplayObject):int
子 DisplayObject インスタンスのインデックス位置を返します。 Returns the index position of a child DisplayObject instance.
ExSprite
  
insertCommand(... commands):void
特定のイベントが送出された際に、自動実行させたい Command インスタンスをすでにリストに登録され、実行中の Command インスタンスの次の位置に追加します。 追加された Command インスタンスは、イベントが送出される直前に自動的に初期化されます。 このメソッドを使用するためには executor プロパティに CommandExecutor が実装されている必要があります。
CastSprite
 Inherited
DisplayObjectContainer に追加されている全ての子 DisplayObject インスタンスを削除します。 Remove the whole child DisplayObject instance which added to the DisplayObjectContainer.
ExSprite
 Inherited
removeChild(child:DisplayObject):DisplayObject
DisplayObjectContainer インスタンスの子リストから指定の DisplayObject インスタンスを削除します。 Removes the specified child DisplayObject instance from the child list of the DisplayObjectContainer instance.
ExSprite
 Inherited
removeChildAt(index:int):DisplayObject
DisplayObjectContainer の子リストの指定されたインデックス位置から子 DisplayObject インスタンスを削除します。 Removes a child DisplayObject from the specified index position in the child list of the DisplayObjectContainer.
ExSprite
 Inherited
setChildIndex(child:DisplayObject, index:int):void
表示オブジェクトコンテナの既存の子の位置を変更します。 Changes the position of an existing child in the display object container.
ExSprite
 Inherited
setChildIndexAbove(child:DisplayObject, index:int):void
表示オブジェクトコンテナの既存の子の位置を変更します。 Changes the position of an existing child in the display object container.
ExSprite
 Inherited
setProperties(parameters:Object):DisplayObject
インスタンスに対して、複数のプロパティを一括設定します。 Setup the several instance properties.
ExSprite
 Inherited
startDrag(lockCenter:Boolean = false, bounds:Rectangle = null):void
指定されたスプライトをユーザーがドラッグできるようにします。 Allow the user to drag the specified sprite.
ExSprite
 Inherited
stopDrag():void
startDrag() メソッドを終了します。 Ends the startDrag() method.
ExSprite
 Inherited
swapChildren(child1:DisplayObject, child2:DisplayObject):void
指定された 2 つの子オブジェクトの z 順序(重ね順)を入れ替えます。 Swaps the z-order (front-to-back order) of the two specified child objects.
ExSprite
 Inherited
swapChildrenAt(index1:int, index2:int):void
子リスト内の指定されたインデックス位置に該当する 2 つの子オブジェクトの z 順序(重ね順)を入れ替えます。 Swaps the z-order (front-to-back order) of the child objects at the two specified index positions in the child list.
ExSprite
 Inherited
toString():String
指定されたオブジェクトのストリング表現を返します。 Returns the string representation of the specified object.
ExSprite
  
updateManager():Boolean
マネージャーオブジェクトとの関連付けを更新します。
CastSprite
Protected Methods
 MethodDefined by
  
atCastAdded():void
キャストオブジェクトが CastEvent.CAST_ADDED イベントを受け取った場合に呼び出されるオーバーライド・イベントハンドラメソッドです。 このイベント処理の実行中には、ExecutorObject を使用した非同期処理が行えます。
CastSprite
  
キャストオブジェクトが CastEvent.CAST_REMOVED イベントを受け取った場合に呼び出されるオーバーライド・イベントハンドラメソッドです。 このイベント処理の実行中には、ExecutorObject を使用した非同期処理が行えます。
CastSprite
Events
 EventSummaryDefined by
   IExecutable オブジェクトが AddChild コマンド、または AddChildAt コマンド経由で表示リストに追加された場合に送出されます。 このイベント処理の実行中には、ExecutorObject を使用した非同期処理が行えます。 CastSprite
   CastEvent.CAST_ADDED イベント中に実行された非同期処理が完了した場合に送出されます。 CastSprite
   IExecutable オブジェクトが RemoveChild コマンド、または RemoveAllChild コマンド経由で表示リストから削除された場合に送出されます。 このイベント処理の実行中には、ExecutorObject を使用した非同期処理が行えます。 CastSprite
   CastEvent.CAST_REMOVED イベント中に実行された非同期処理が完了した場合に送出されます。 CastSprite
   非同期処理中にエラーが発生した場合に送出されます。 CastSprite
   Progression インスタンスとの関連付けがアクティブになったときに送出されます。 CastSprite
   Progression インスタンスとの関連付けが非アクティブになったときに送出されます。 CastSprite
Property detail
contextMenuproperty
contextMenu:ContextMenu  [read-write]

このオブジェクトに関連付けられたコンテキストメニューを指定します。 Specifies the context menu associated with this object.

Implementation
    public function get contextMenu():ContextMenu
    public function set contextMenu(value:ContextMenu):void
executorproperty 
executor:ExecutorObject  [read-only]

関連付けられている ExecutorObject インスタンスを取得します。

Implementation
    public function get executor():ExecutorObject

See also

managerproperty 
manager:Progression  [read-only]

関連付けられている Progression インスタンスを取得します。

Implementation
    public function get manager():Progression

See also

onCastAddedproperty 
onCastAdded:Function  [read-write]

キャストオブジェクトが CastEvent.CAST_ADDED イベントを受け取った場合に呼び出されるイベントハンドラメソッドを取得または設定します。 このイベント処理の実行中には、ExecutorObject を使用した非同期処理が行えます。

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

See also

onCastRemovedproperty 
onCastRemoved:Function  [read-write]

キャストオブジェクトが CastEvent.CAST_REMOVED イベントを受け取った場合に呼び出されるイベントハンドラメソッドを取得または設定します。 このイベント処理の実行中には、ExecutorObject を使用した非同期処理が行えます。

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

See also

selfproperty 
self:CastSprite  [read-only]

自身の参照を取得します。

Implementation
    public function get self():CastSprite
toolTipproperty 
toolTip:IToolTip  [read-write]

関連付けられている IToolTip インスタンスを取得します。

Implementation
    public function get toolTip():IToolTip
    public function set toolTip(value:IToolTip):void
Constructor detail
CastSprite()constructor
public function CastSprite(initObject:Object = null)

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

Parameters
initObject:Object (default = null)設定したいプロパティを含んだオブジェクトです。
Method detail
addCommand()method
public function addCommand(... commands):void

特定のイベントが送出された際に、自動実行させたい Command インスタンスをリストの最後尾に追加します。 追加された Command インスタンスは、イベントが送出される直前に自動的に初期化されます。 このメソッドを使用するためには executor プロパティに CommandExecutor が実装されている必要があります。

Parameters
... commands登録したいコマンドを含む配列です。

See also

atCastAdded()method 
protected function atCastAdded():void

キャストオブジェクトが CastEvent.CAST_ADDED イベントを受け取った場合に呼び出されるオーバーライド・イベントハンドラメソッドです。 このイベント処理の実行中には、ExecutorObject を使用した非同期処理が行えます。

See also

atCastRemoved()method 
protected function atCastRemoved():void

キャストオブジェクトが CastEvent.CAST_REMOVED イベントを受け取った場合に呼び出されるオーバーライド・イベントハンドラメソッドです。 このイベント処理の実行中には、ExecutorObject を使用した非同期処理が行えます。

See also

clearCommand()method 
public function clearCommand(completely:Boolean = false):void

登録されている Command インスタンスを削除します。 このメソッドを使用するためには executor プロパティに CommandExecutor が実装されている必要があります。

Parameters
completely:Boolean (default = false)true が設定されている場合は登録されている全てのコマンド登録を解除し、false の場合には現在処理中のコマンド以降の登録を解除します。

See also

dispose()method 
public function dispose():void

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

insertCommand()method 
public function insertCommand(... commands):void

特定のイベントが送出された際に、自動実行させたい Command インスタンスをすでにリストに登録され、実行中の Command インスタンスの次の位置に追加します。 追加された Command インスタンスは、イベントが送出される直前に自動的に初期化されます。 このメソッドを使用するためには executor プロパティに CommandExecutor が実装されている必要があります。

Parameters
... commands登録したいコマンドを含む配列です。

See also

updateManager()method 
public function updateManager():Boolean

マネージャーオブジェクトとの関連付けを更新します。

Returns
Boolean関連付けが成功したら true を、それ以外は false を返します。

See also

Event detail
castAddedevent 
Event object type: jp.progression.events.CastEvent

IExecutable オブジェクトが AddChild コマンド、または AddChildAt コマンド経由で表示リストに追加された場合に送出されます。 このイベント処理の実行中には、ExecutorObject を使用した非同期処理が行えます。

castAddedCompleteevent  
Event object type: jp.progression.events.CastEvent

CastEvent.CAST_ADDED イベント中に実行された非同期処理が完了した場合に送出されます。

castRemovedevent  
Event object type: jp.progression.events.CastEvent

IExecutable オブジェクトが RemoveChild コマンド、または RemoveAllChild コマンド経由で表示リストから削除された場合に送出されます。 このイベント処理の実行中には、ExecutorObject を使用した非同期処理が行えます。

castRemovedCompleteevent  
Event object type: jp.progression.events.CastEvent

CastEvent.CAST_REMOVED イベント中に実行された非同期処理が完了した場合に送出されます。

executeErrorevent  
Event object type: jp.progression.events.ExecuteErrorEvent

非同期処理中にエラーが発生した場合に送出されます。

managerActivateevent  
Event object type: jp.progression.events.ManagerEvent

Progression インスタンスとの関連付けがアクティブになったときに送出されます。

managerDeactivateevent  
Event object type: jp.progression.events.ManagerEvent

Progression インスタンスとの関連付けが非アクティブになったときに送出されます。