Packagesekati.display
Classpublic class Canvas
InheritanceCanvas Inheritance CoreSprite Inheritance flash.display.Sprite
SubclassesDocument

The API Canvas (sekati.display.Document's superclass): exposes top-level, "global" access to the stage, root, loaderInfo & flashVar for all classes (including non-DisplayObject classes).

Developers implementing the API may find it handy to reference these objects via their static references:

Note: Canvas supports the loading of API implemented application in to other SWF application or running "standalone". This is accomplished by calling setReferences() in both the Canvas constructor & in the ADDED_TO_STAGE event handler of the subclassed Document Class. This prevents failure when being loaded in to another SWF's DisplayList.

See also

sekati.display.Document


Public Properties
 PropertyDefined by
 Inheritedenabled : Boolean
Boolean stub property which subclasses implement to control core behavor availability such as interactivity, liquidity, drag-drop functionality.
CoreSprite
  flashVars : 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
  hasParent : 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
  loaderInfo : 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
  root : 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
  stage : Stage
[static] Reference to the Application stage instance which represents the main drawing area.
Canvas
Public Methods
 MethodDefined by
  
Canvas Constructor
Canvas
 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
 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
  
Initialize or update the core DisplayList reference properties.
Canvas
Property detail
flashVarsproperty
public static var flashVars:Object

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.

hasParentproperty 
public static var hasParent:Boolean

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.

loaderInfoproperty 
public static var loaderInfo:LoaderInfo

Reference to the LoaderInfo object associated with the SWF file containing information about loading the file to which this display object belongs.

rootproperty 
public static var root:DisplayObject

Reference to the Application root which represents the top-most display object, if this is the first SWF file loaded (e.g. has not been loaded by another SWF), the root property is the display object itself. The root property of the Stage object is the Stage object itself.

stageproperty 
public static var stage:Stage

Reference to the Application stage instance which represents the main drawing area.

Constructor detail
Canvas()constructor
public function Canvas()

Canvas Constructor

Method detail
setReferences()method
protected function setReferences():void

Initialize or update the core DisplayList reference properties.

This is externalized from the constructor so we may update the references when being loaded as an API application.

A check is made to see if the parent is an APILoader instance: if true then the main API application is being loaded by a preloader and the references are remapped to secure the top-level stage, root, loaderInfo, flashVars.