Class: Sprite

Sprite

Sprite クラスは、表示リストの基本的要素です。
グラフィックを表示でき、子を持つこともできる表示リストノードです。

The Sprite class is a basic display list building block:
a display list node that can display graphics and can also contain children.

new next2d.display.Sprite ()

Extends

  • DisplayObjectContainer

Members

next2d.display.Sprite.namespace staticconstant

指定されたクラスの空間名を返します。
Returns the space name of the specified class.

Default Value:
  • next2d.display.Sprite

buttonMode boolean

このスプライトのボタンモードを指定します。
Specifies the button mode of this sprite.

Default Value:
  • false

dropTarget DisplayObject | null readonly

スプライトのドラッグ先またはスプライトがドロップされた先の表示オブジェクトを指定します。
Specifies the display object over which the sprite is being dragged,
or on which the sprite was dropped.

graphics Graphics readonly

ベクターの描画コマンドが発生するこのスプライトに属する Graphics オブジェクトを指定します。
Specifies the Graphics object that belongs to this sprite
where vector drawing commands can occur.

hitArea Sprite | null

スプライトのヒット領域となる別のスプライトを指定します。
Designates another sprite to serve as the hit area for a sprite.

namespace constant

指定されたオブジェクトの空間名を返します。
Returns the space name of the specified object.

Default Value:
  • next2d.display.Sprite

soundTransform SoundTransform

このスプライト内のサウンドを制御します。
Controls sound within this sprite.

useHandCursor boolean

buttonMode プロパティが true に設定されたスプライト上にポインターが移動したときに、
指差しハンドポインター(ハンドカーソル)を表示するかどうかを示すブール値です。
A Boolean value that indicates whether the pointing hand (hand cursor)
appears when the pointer rolls over a sprite
in which the buttonMode property is set to true.

Default Value:
  • true

Methods

next2d.display.Sprite.toString ()string static

指定されたクラスのストリングを返します。
Returns the string representation of the specified class.

Default Value:
  • [class Sprite]
Returns:
TypeDescription
string

startDrag (lock_center, bounds)void

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

NameTypeDefaultDescription
lock_centerbooleanfalseoptional
boundsRectanglenulloptional
Returns:
TypeDescription
void

stopDrag ()

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

Returns:
void

toString ()string

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

Default Value:
  • [object Sprite]
Returns:
TypeDescription
string