Class: MovieClip

MovieClip

MovieClip クラスは、Sprite、DisplayObjectContainer、InteractiveObject、DisplayObject
および EventDispatcher クラスを継承します。
MovieClip オブジェクトには、Sprite オブジェクトとは違ってタイムラインがあります。
タイムラインの再生ヘッドが停止されても、その MovieClip オブジェクトの子 MovieClip オブジェクトの再生ヘッドは停止しません。

The MovieClip class inherits from the following classes: Sprite, DisplayObjectContainer,
InteractiveObject, DisplayObject, and EventDispatcher.
Unlike the Sprite object, a MovieClip object has a timeline.
When the playback head of the timeline is stopped,
the playback head of the child MovieClip object of that MovieClip object will not be stopped.

new next2d.display.MovieClip ()

Extends

  • Sprite

Members

next2d.display.MovieClip.namespace staticconstant

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

Default Value:
  • next2d.display.MovieClip

currentFrame number readonly

MovieClip インスタンスのタイムライン内の再生ヘッドが置かれているフレームの番号を示します。
Specifies the number of the frame in which the playhead is located
in the timeline of the MovieClip instance.

Default Value:
  • 1

currentFrameLabel FrameLabel | null readonly

MovieClip インスタンスのタイムライン内の現在のフレームにあるラベルです。
The label at the current frame in the timeline of the MovieClip instance.

currentLabels array | null readonly

現在のシーンの FrameLabel オブジェクトの配列を返します。
Returns an array of FrameLabel objects from the current scene.

isPlaying boolean readonly

ムービークリップが現在再生されているかどうかを示すブール値です。
A Boolean value that indicates whether a movie clip is curently playing.

Default Value:
  • false

loopConfig object

MovieClipのフレームヘッダーの移動方法の設定オブジェクトを返します。
Returns a configuration object for how MovieClip's frame headers are moved.

Default Value:
  • null

namespace constant

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

Default Value:
  • next2d.display.MovieClip

totalFrames number readonly

MovieClip インスタンス内のフレーム総数です。
The total number of frames in the MovieClip instance.

Default Value:
  • 1

Methods

next2d.display.MovieClip.toString ()string static

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

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

addFrameLabel (frame_label)void

タイムラインに対して動的にLabelを追加できます。
Labels can be added dynamically to the timeline.

NameTypeDescription
frame_labelFrameLabel
Returns:
TypeDescription
void
Example

Example1 usage of addFrameLabel.

// case 1
const {MovieClip, FrameLabel} = next2d.display;
const movieClip = new MovieClip();
movieClip.addFrameLabel(new FrameLabel(1, "start"));

addFrameScript ()void

指定のフレームのアクションを追加できます
You can add an action for a given frame.

Returns:
TypeDescription
void
Examples

Example1 usage of addFrameScript.

// case 1
const {MovieClip} = next2d.display;
const movieClip = new MovieClip();
movieClip.addFrameScript(1 , function ()
{
    this.stop();
});

Example3 usage of addFrameScript.

// case 2
const {MovieClip} = next2d.display;
const movieClip = new MovieClip();
movieClip.addFrameScript(1, method_1, 2, method_2, 10, method_10);

gotoAndPlay (frame)void

指定されたフレームで SWF ファイルの再生を開始します。
Starts playing the SWF file at the specified frame.

NameTypeDescription
framenumber | string
Returns:
TypeDescription
void

gotoAndStop (frame)void

このムービークリップの指定されたフレームに再生ヘッドを送り、そこで停止させます。
Brings the playhead to the specified frame
of the movie clip and stops it there.

NameTypeDescription
framenumber | string
Returns:
TypeDescription
void

nextFrame ()void

次のフレームに再生ヘッドを送り、停止します。
Sends the playhead to the next frame and stops it.

Returns:
TypeDescription
void

play ()void

ムービークリップのタイムライン内で再生ヘッドを移動します。
Moves the playhead in the timeline of the movie clip.

Returns:
TypeDescription
void

prevFrame ()void

直前のフレームに再生ヘッドを戻し、停止します。
Sends the playhead to the previous frame and stops it.

Returns:
TypeDescription
void

stop ()void

ムービークリップ内の再生ヘッドを停止します。
Stops the playhead in the movie clip.

Returns:
TypeDescription
void

toString ()string

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

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