Packagesekati.display
Classpublic class Document
InheritanceDocument Inheritance Canvas Inheritance CoreSprite Inheritance flash.display.Sprite
SubclassesSekatiMain

This is the API's main Document Class. Any application wishing to implement the core API should extend their projects Document Class with sekati.display.Document & override with customizations as needed.

API Initialization Routine:

  1. initDocument - initializes the Application Document's Canvas on ADDED_TO_STAGE (to support the option of loadable API applications), or effectively on SWF initialization as the Document subclass is the Stage itself.
  2. initMovieProperties - sets SWF movie properties & initializes StageDisplay.
  3. ApplicationLoader - instantiates & waits for the SWF file to finish loading.
  4. initTweenEngine - sets up Tweener shortcut properties.
  5. initAPI - instantiates Boostrap & waits for the queued initialization routines to complete.
  6. initEntryPoint - the baseline API has been initialized; the developers custom code layer enters here.

See also

sekati.display.DocumentPreloader
sekati.display.Canvas
sekati.core.Bootstrap
sekati.core.App


Public Properties
 PropertyDefined by
  bootstrap : Bootstrap
[read-only] The Boostrap (queued initialization) for adding BootstrapEvent listeners.
Document
 Inheritedenabled : Boolean
Boolean stub property which subclasses implement to control core behavor availability such as interactivity, liquidity, drag-drop functionality.
CoreSprite
 InheritedflashVars : Object
[static] Reference to the object that contains name-value pairs that represent the parameters provided to the loaded SWF file through the Object Embed Flashvars tags.
Canvas
 InheritedhasParent : Boolean
[static] Reference property which defines whether the Canvas has a parent (and has thus been loaded by another SWF): true or not (is executing under its own FlashPlayer instance): false.
Canvas
 InheritedinteractiveMode : Boolean
Specifies the mouse cursors modal state in the object as an interactive target via: buttonMode, mouseChildren & tabChildren.
CoreSprite
 InheritedloaderInfo : LoaderInfo
[static] Reference to the LoaderInfo object associated with the SWF file containing information about loading the file to which this display object belongs.
Canvas
  preloader : ApplicationLoader
[read-only] The ApplicationLoader instance if load progress checking is desired via BootstrapEvent.APP_LOAD listeners.
Document
 Inheritedroot : DisplayObject
[static] Reference to the Application root which represents the top-most display object, if this is the first SWF file loaded (e.g.
Canvas
 Inheritedscale : Number
The scale value.
CoreSprite
 Inheritedstage : Stage
[static] Reference to the Application stage instance which represents the main drawing area.
Canvas
Public Methods
 MethodDefined by
  
Document Constructor begins the sequential API initialization with initMovieProperties() & instantiating ApplicationLoader.
Document
 Inherited
addChildren(... args):void
Add multiple child DisplayObject's.
CoreSprite
 Inherited
destroy():void
Clean up after thy self.
CoreSprite
 Inherited
toString():String
Return reflective output.
CoreSprite
Protected Methods
 MethodDefined by
  
The SWF has been fully loaded: removed the ApplicationLoader & execute Document setup code: initTweenEngine() & initAPI().
Document
  
The Application API has been fully initialized; remove the Bootstrap & call initEntryPoint.
Document
  
initAPI(hasBootstrap:Boolean = true):void
Initialize the API Bootstrap queued core initialization routines.
Document
  
initDocument(e:Event):void
Initialize the Document & update the Canvas references.
Document
  
Initialize Entry Point: all custom (non-API) application layer code enters.
Document
  
Initializes SWF movie properties & StageDisplay.
Document
  
Initialize Tweener specialProperties shortcuts.
Document
 Inherited
invalidate():void
Request a redraw, use for deferred rendering.
CoreSprite
 Inherited
offStage(e:Event = null):void
Stub: Sprite has been removed from stage.
CoreSprite
 Inherited
onStage(e:Event = null):void
Stub: Sprite has been added to stage.
CoreSprite
 Inherited
Initialize or update the core DisplayList reference properties.
Canvas
Property detail
bootstrapproperty
bootstrap:Bootstrap  [read-only]

The Boostrap (queued initialization) for adding BootstrapEvent listeners.

Implementation
    public function get bootstrap():Bootstrap
preloaderproperty 
preloader:ApplicationLoader  [read-only]

The ApplicationLoader instance if load progress checking is desired via BootstrapEvent.APP_LOAD listeners.

Implementation
    public function get preloader():ApplicationLoader
Constructor detail
Document()constructor
public function Document()

Document Constructor begins the sequential API initialization with initMovieProperties() & instantiating ApplicationLoader.

Method detail
documentHandler()method
protected function documentHandler(e:BootstrapEvent):void

The SWF has been fully loaded: removed the ApplicationLoader & execute Document setup code: initTweenEngine() & initAPI().

Customization: Should not be necessary.

Parameters
e:BootstrapEvent
entryPointHandler()method 
protected function entryPointHandler(e:BootstrapEvent):void

The Application API has been fully initialized; remove the Bootstrap & call initEntryPoint.

Customization: Should not be necessary.

Parameters
e:BootstrapEvent
initAPI()method 
protected function initAPI(hasBootstrap:Boolean = true):void

Initialize the API Bootstrap queued core initialization routines.

Parameters
hasBootstrap:Boolean (default = true) — defines whether the Document initializes the API Bootstrap sequence or runs the API "dumb".

Customization: Override this method & adjust to point to your custom Bootstrap (extended from sekati.core.Bootstrap) if custom initialization is required or override and alter the default hasBootstrap = true to false if no bootstrapping is needed.

See also


Example
If you would like to skip the API Bootstrapping sequence & run the API "dumb"; in your Main Document class (which extends sekati.display.Document):
    override protected function initAPI(hasBootstrap : Boolean = false) : void {
     super.initAPI( hasBootstrap );
    }
   

initDocument()method 
protected function initDocument(e:Event):void

Initialize the Document & update the Canvas references.

Parameters
e:Event
initEntryPoint()method 
protected function initEntryPoint():void

Initialize Entry Point: all custom (non-API) application layer code enters.

Customization: When implementing the API you will most likely extend Document as your Document Class overriding initEntryPoint to instantiate your manager, ui & other core classes.

initMovieProperties()method 
protected function initMovieProperties():void

Initializes SWF movie properties & StageDisplay.

Customization: Override this method & adjust to fit your application specification. Be sure to either call super.initMovieProperties() or StageDisplay.$.init() to initialize stage management.

initTweenEngine()method 
protected function initTweenEngine():void

Initialize Tweener specialProperties shortcuts.

Customization: When overriding this method only init the shortcuts needed by your application to minimize memory usage.

See also