Packagejp.nium.display
Classpublic class ExSprite
InheritanceExSprite Inheritance flash.display.Sprite
ImplementsIDisplayObjectContainer, IIdGroup, jp.nium.core.impls.IExDisplayObjectContainer
SubclassesCastSprite

ExSprite クラスは、Sprite クラスの基本機能を拡張した jp.nium パッケージで使用される基本的な表示オブジェクトクラスです。 ExSprite class is a basic display object class used at jp.nium package which extends the basic function of Sprite class.


Example
  // ExSprite インスタンスを作成する
  var sp:ExSprite = new ExSprite();
  

See also

jp.nium.display.getInstanceById()
jp.nium.display.getInstancesByGroup()


Public Properties
 PropertyDefined by
  children : Array
[read-only] 子ディスプレイオブジェクトが保存されている配列です。 インデックス値が断続的に指定可能であるため、getChildAt() ではなくこのプロパティを使用して子ディスプレイオブジェクト走査を行います。 この配列を操作することで元の配列を変更することはできません。 The array that saves child display objects.
ExSprite
  className : String
[read-only] インスタンスのクラス名を取得します。 Indicates the instance className of the IExDisplayObject.
ExSprite
  group : String
インスタンスのグループ名を取得または設定します。 Indicates the instance group of the IExDisplayObject.
ExSprite
  id : String
インスタンスの識別子を取得または設定します。 Indicates the instance id of the IExDisplayObject.
ExSprite
  isDragging : Boolean
[read-only] startDrag() メソッドを使用したドラッグ処理を行っている最中かどうかを取得します。 Returns if the drag process which uses startDrag() method is executing.
ExSprite
  useChildIndexer : Boolean
[read-only]
ExSprite
Public Methods
 MethodDefined by
  
ExSprite(initObject:Object = null)
新しい ExSprite インスタンスを作成します。 Creates a new ExSprite object.
ExSprite
  
addChild(child:DisplayObject):DisplayObject
この DisplayObjectContainer インスタンスに子 DisplayObject インスタンスを追加します。 Adds a child DisplayObject instance to this DisplayObjectContainer instance.
ExSprite
  
addChildAt(child:DisplayObject, index:int):DisplayObject
この DisplayObjectContainer インスタンスの指定されたインデックス位置に子 DisplayObject インスタンスを追加します。 Adds a child DisplayObject instance to this DisplayObjectContainer instance.
ExSprite
  
addChildAtAbove(child:DisplayObject, index:int):DisplayObject
この DisplayObjectContainer インスタンスの指定されたインデックス位置に子 DisplayObject インスタンスを追加します。 Adds a child DisplayObject instance to this DisplayObjectContainer instance.
ExSprite
  
getChildAt(index:int):DisplayObject
指定のインデックス位置にある子表示オブジェクトオブジェクトを返します。 Returns the child display object instance that exists at the specified index.
ExSprite
  
getChildIndex(child:DisplayObject):int
子 DisplayObject インスタンスのインデックス位置を返します。 Returns the index position of a child DisplayObject instance.
ExSprite
  
DisplayObjectContainer に追加されている全ての子 DisplayObject インスタンスを削除します。 Remove the whole child DisplayObject instance which added to the DisplayObjectContainer.
ExSprite
  
removeChild(child:DisplayObject):DisplayObject
DisplayObjectContainer インスタンスの子リストから指定の DisplayObject インスタンスを削除します。 Removes the specified child DisplayObject instance from the child list of the DisplayObjectContainer instance.
ExSprite
  
removeChildAt(index:int):DisplayObject
DisplayObjectContainer の子リストの指定されたインデックス位置から子 DisplayObject インスタンスを削除します。 Removes a child DisplayObject from the specified index position in the child list of the DisplayObjectContainer.
ExSprite
  
setChildIndex(child:DisplayObject, index:int):void
表示オブジェクトコンテナの既存の子の位置を変更します。 Changes the position of an existing child in the display object container.
ExSprite
  
setChildIndexAbove(child:DisplayObject, index:int):void
表示オブジェクトコンテナの既存の子の位置を変更します。 Changes the position of an existing child in the display object container.
ExSprite
  
setProperties(parameters:Object):DisplayObject
インスタンスに対して、複数のプロパティを一括設定します。 Setup the several instance properties.
ExSprite
  
startDrag(lockCenter:Boolean = false, bounds:Rectangle = null):void
指定されたスプライトをユーザーがドラッグできるようにします。 Allow the user to drag the specified sprite.
ExSprite
  
stopDrag():void
startDrag() メソッドを終了します。 Ends the startDrag() method.
ExSprite
  
swapChildren(child1:DisplayObject, child2:DisplayObject):void
指定された 2 つの子オブジェクトの z 順序(重ね順)を入れ替えます。 Swaps the z-order (front-to-back order) of the two specified child objects.
ExSprite
  
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
  
toString():String
指定されたオブジェクトのストリング表現を返します。 Returns the string representation of the specified object.
ExSprite
Property detail
childrenproperty
children:Array  [read-only]

子ディスプレイオブジェクトが保存されている配列です。 インデックス値が断続的に指定可能であるため、getChildAt() ではなくこのプロパティを使用して子ディスプレイオブジェクト走査を行います。 この配列を操作することで元の配列を変更することはできません。 The array that saves child display objects. Because the index value can specify intermittently, it scans the child display object by not using getChildAt() but using this property. It can not change the original array by operating this array.

Implementation
    public function get children():Array
classNameproperty 
className:String  [read-only]

インスタンスのクラス名を取得します。 Indicates the instance className of the IExDisplayObject.

Implementation
    public function get className():String
groupproperty 
group:String  [read-write]

インスタンスのグループ名を取得または設定します。 Indicates the instance group of the IExDisplayObject.

Implementation
    public function get group():String
    public function set group(value:String):void

See also

idproperty 
id:String  [read-write]

インスタンスの識別子を取得または設定します。 Indicates the instance id of the IExDisplayObject.

Implementation
    public function get id():String
    public function set id(value:String):void

See also

isDraggingproperty 
isDragging:Boolean  [read-only]

startDrag() メソッドを使用したドラッグ処理を行っている最中かどうかを取得します。 Returns if the drag process which uses startDrag() method is executing.

Implementation
    public function get isDragging():Boolean

See also

useChildIndexerproperty 
useChildIndexer:Boolean  [read-only]

Implementation
    public function get useChildIndexer():Boolean
Constructor detail
ExSprite()constructor
public function ExSprite(initObject:Object = null)

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

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

この DisplayObjectContainer インスタンスに子 DisplayObject インスタンスを追加します。 Adds a child DisplayObject instance to this DisplayObjectContainer instance.

Parameters
child:DisplayObject対象の DisplayObjectContainer インスタンスの子として追加する DisplayObject インスタンスです。 The DisplayObject instance to add as a child of this DisplayObjectContainer instance.

Returns
DisplayObjectchild パラメータで渡す DisplayObject インスタンスです。 The DisplayObject instance that you pass in the child parameter.
addChildAt()method 
public override function addChildAt(child:DisplayObject, index:int):DisplayObject

この DisplayObjectContainer インスタンスの指定されたインデックス位置に子 DisplayObject インスタンスを追加します。 Adds a child DisplayObject instance to this DisplayObjectContainer instance.

Parameters
child:DisplayObject対象の DisplayObjectContainer インスタンスの子として追加する DisplayObject インスタンスです。 The DisplayObject instance to add as a child of this DisplayObjectContainer instance.
 
index:int子を追加するインデックス位置です。 The index position to which the child is added. If you specify a currently occupied index position, the child object that exists at that position and all higher positions are moved up one position in the child list.

Returns
DisplayObjectchild パラメータで渡す DisplayObject インスタンスです。 The DisplayObject instance that you pass in the child parameter.
addChildAtAbove()method 
public function addChildAtAbove(child:DisplayObject, index:int):DisplayObject

この DisplayObjectContainer インスタンスの指定されたインデックス位置に子 DisplayObject インスタンスを追加します。 Adds a child DisplayObject instance to this DisplayObjectContainer instance.

Parameters
child:DisplayObject対象の DisplayObjectContainer インスタンスの子として追加する DisplayObject インスタンスです。 The DisplayObject instance to add as a child of this DisplayObjectContainer instance.
 
index:int子を追加するインデックス位置です。 The index position to which the child is added. If you specify a currently occupied index position, the child object that exists at that position and all higher positions are moved up one position in the child list.

Returns
DisplayObjectchild パラメータで渡す DisplayObject インスタンスです。 The DisplayObject instance that you pass in the child parameter.
getChildAt()method 
public override function getChildAt(index:int):DisplayObject

指定のインデックス位置にある子表示オブジェクトオブジェクトを返します。 Returns the child display object instance that exists at the specified index.

Parameters
index:int子 DisplayObject インスタンスのインデックス位置です。 The index position of the child object.

Returns
DisplayObject指定されたインデックス位置にある子 DisplayObject インスタンスです。 The child display object at the specified index position.
getChildIndex()method 
public override function getChildIndex(child:DisplayObject):int

子 DisplayObject インスタンスのインデックス位置を返します。 Returns the index position of a child DisplayObject instance.

Parameters
child:DisplayObject特定する子 DisplayObject インスタンスです。 The DisplayObject instance to identify.

Returns
int特定する子 DisplayObject インスタンスのインデックス位置です。 The index position of the child display object to identify.
removeAllChildren()method 
public function removeAllChildren():void

DisplayObjectContainer に追加されている全ての子 DisplayObject インスタンスを削除します。 Remove the whole child DisplayObject instance which added to the DisplayObjectContainer.

removeChild()method 
public override function removeChild(child:DisplayObject):DisplayObject

DisplayObjectContainer インスタンスの子リストから指定の DisplayObject インスタンスを削除します。 Removes the specified child DisplayObject instance from the child list of the DisplayObjectContainer instance.

Parameters
child:DisplayObject対象の DisplayObjectContainer インスタンスの子から削除する DisplayObject インスタンスです。 The DisplayObject instance to remove.

Returns
DisplayObjectchild パラメータで渡す DisplayObject インスタンスです。 The DisplayObject instance that you pass in the child parameter.
removeChildAt()method 
public override function removeChildAt(index:int):DisplayObject

DisplayObjectContainer の子リストの指定されたインデックス位置から子 DisplayObject インスタンスを削除します。 Removes a child DisplayObject from the specified index position in the child list of the DisplayObjectContainer.

Parameters
index:int削除する DisplayObject の子インデックスです。 The child index of the DisplayObject to remove.

Returns
DisplayObject削除された DisplayObject インスタンスです。 The DisplayObject instance that was removed.
setChildIndex()method 
public override function setChildIndex(child:DisplayObject, index:int):void

表示オブジェクトコンテナの既存の子の位置を変更します。 Changes the position of an existing child in the display object container.

Parameters
child:DisplayObjectインデックス番号を変更する子 DisplayObject インスタンスです。 The child DisplayObject instance for which you want to change the index number.
 
index:intchild インスタンスの結果のインデックス番号です。 The resulting index number for the child display object.
setChildIndexAbove()method 
public function setChildIndexAbove(child:DisplayObject, index:int):void

表示オブジェクトコンテナの既存の子の位置を変更します。 Changes the position of an existing child in the display object container.

Parameters
child:DisplayObjectインデックス番号を変更する子 DisplayObject インスタンスです。 The child DisplayObject instance for which you want to change the index number.
 
index:intchild インスタンスの結果のインデックス番号です。 The resulting index number for the child display object.
setProperties()method 
public function setProperties(parameters:Object):DisplayObject

インスタンスに対して、複数のプロパティを一括設定します。 Setup the several instance properties.

Parameters
parameters:Object設定したいプロパティを含んだオブジェクトです。 The object that contains the property to setup.

Returns
DisplayObject自身の参照です。
startDrag()method 
public override function startDrag(lockCenter:Boolean = false, bounds:Rectangle = null):void

指定されたスプライトをユーザーがドラッグできるようにします。 Allow the user to drag the specified sprite.

Parameters
lockCenter:Boolean (default = false)ドラッグ可能なスプライトが、マウス位置の中心にロックされるか (true)、ユーザーがスプライト上で最初にクリックした点にロックされるか (false) を指定します。 Specify the sprite which will be able to drag locks at the center of the mouse position(true) or the first point that the user clicked on the sprite(false).
 
bounds:Rectangle (default = null)Sprite の制限矩形を指定する Sprite の親の座標を基準にした相対値です。 Specify the limitation rectangle of the sprite. It is a relative value based on parents' coordinates of the sprite.

See also

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

startDrag() メソッドを終了します。 Ends the startDrag() method.

See also

swapChildren()method 
public override function swapChildren(child1:DisplayObject, child2:DisplayObject):void

指定された 2 つの子オブジェクトの z 順序(重ね順)を入れ替えます。 Swaps the z-order (front-to-back order) of the two specified child objects.

Parameters
child1:DisplayObject先頭の子 DisplayObject インスタンスです。 The first child object.
 
child2:DisplayObject2 番目の子 DisplayObject インスタンスです。 The second child object.
swapChildrenAt()method 
public override function 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.

Parameters
index1:int最初の子 DisplayObject インスタンスのインデックス位置です。 The index position of the first child object.
 
index2:int2 番目の子 DisplayObject インスタンスのインデックス位置です。 The index position of the second child object.
toString()method 
public override function toString():String

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

Returns
Stringオブジェクトのストリング表現です。 A string representation of the object.