Manages display objects that need to be created dynamically, such as sub-components of a complex UI component.

Available since

1.0.0

.

See also:

Static methods

staticwithClass<T, B>(displayObjectType:Class<T>, ?destroy:T ‑> Void):DisplayObjectFactory<T, B>

Creates a DisplayObjectFactory that instantiates a display object by instantiating the specified class. The class must have a constructor with zero required arguments.

To instantiate an object with one or more required constructor arguments, use DisplayObjectFactory.withFunction() instead.

staticwithDisplayObject<T, B>(displayObject:T, ?destroy:T ‑> Void):DisplayObjectFactory<T, B>

Creates a DisplayObjectFactory that instantiates a display object by instantiating the specified class. The class must have a constructor with zero required arguments.

To instantiate an object with one or more required constructor arguments, use DisplayObjectFactory.withFunction() instead.

staticwithFunction<T, B>(create:() ‑> T, ?destroy:T ‑> Void):DisplayObjectFactory<T, B>

Creates a DisplayObjectFactory that instantiates a display object by calling the specified function.

Methods

dynamiccreate():T

Creates a new display object.

Available since

1.0.0

.

dynamicdestroy(target:T):Void

Destroys/disposes a display object when it will no longer be used.

Available since

1.0.0

.