Class: Loader

Loader

Loader クラスは、JSON ファイルまたはイメージ(JPEG、PNG、または GIF)ファイルを読み込むために使用します。
読み込みを開始するには load() メソッドを使用します。
読み込まれた表示オブジェクトは Loader オブジェクトの子として追加されます。

The Loader class is used to load JSON files or image (JPEG, PNG, or GIF) files.
Use the load() method to initiate loading.
The loaded display object is added as a child of the Loader object.

new next2d.display.Loader ()

Extends

  • DisplayObjectContainer

Members

next2d.display.Loader.namespace staticconstant

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

Default Value:
  • next2d.display.Loader

content DisplayObject readonly

load() または loadImage() メソッドを使用して読み込まれた JSON または
イメージ(JPEG、PNG、または GIF)ファイルのルート表示オブジェクトが含まれます。
Contains the root display object of a JSON or image (JPEG, PNG, or GIF) file
that was loaded using the load() or loadImage() methods.

contentLoaderInfo LoaderInfo readonly

読み込まれているオブジェクトに対応する LoaderInfo オブジェクトを返します。
Returns a LoaderInfo object corresponding to the object being loaded.

namespace constant

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

Default Value:
  • next2d.display.Loader

Methods

next2d.display.Loader.toString ()string static

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

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

load (request)void

JSONファイルを、この Loader オブジェクトの子であるcontentプロパティにロードします。
JPEG、GIF、PNGなどの画像データは loadImage で同様にcontentプロパティにロードします。
Load the JSON file into the content property, which is a child of this Loader object.
Image data such as JPEG, GIF, PNG, etc.
are loaded into the content property in the same way with loadImage.

NameTypeDescription
requestURLRequest
Returns:
TypeDescription
void

loadImage (request)void

JPEG、GIFファイルを、この Loader オブジェクトの子であるcontentプロパティにロードします。
Load a JPEG or GIF file into the content property, which is a child of this Loader object.

NameTypeDescription
requestURLRequest
Returns:
TypeDescription
void

toString ()string

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

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