DisplayList, DisplayObject, and DisplayObjectContainer

DisplayList

DisplayList consists of three major elements: 'Stage', 'DisplayObjectContainer', and 'DisplayObject'.

Stage

'Stage' is an object that holds all 'DisplayObject'.

DisplayObjectContainer

'DisplayObjectContainer' is a 'DisplayObject' that can be used to place DisplayObjects, and it inherits from the following four classes.

  • Loader
  • MovieClip
  • Sprite
  • Stage

DisplayObject

'DisplayObject' is an object that executes the drawing process. 9 classes inheriting from 'DisplayObject' are as follows.

  • DisplayObjectContainer
  • Loader
  • MovieClip
  • Sprite
  • Stage
  • InteractiveObject
  • Shape
  • TextField
  • Video

Inheritance Relationship Diagram

Adding Objects

To add a 'DisplayObject' to a 'DisplayObjectContainer', use the addChild method of the DisplayObjectContainer.

Example

Next Chapter