CasaMovieClip

Kind of class:public dynamic class
Package:org.casalib.display
Inherits from:MovieClip
Implements:
Known subclasses:
Version:05/29/09
Author:Aaron Clinger, Mike Creighton
Classpath:org.casalib.display.CasaMovieClip
File last modified:Sunday, 14 June 2009, 19:20:33
A base MovieClip that implements IRemovableEventDispatcher and ICasaDisplayObjectContainer.

Summary


Constructor
Instance properties
  • stage : Stage
    • The Stage of the display object or if the display object is not added to the display list and StageReference is defined stage will return the default stage; otherwise null.
  • destroyed : Boolean
Instance methods
  • removeEventsForType (type:String) : void
    • Removes all events of a specific type.
  • removeEventsForListener (listener:Function) : void
    • Removes all events that report to the specified listener.
  • removeEventListeners : void
    • Removes all event listeners.
  • removeChildren (destroyChildren:Boolean = false, recursive:Boolean = false) : void
    • Removes and optionally destroys children of the CasaMovieClip.
  • removeChildrenAndDestroy (destroyChildren:Boolean = false, recursive:Boolean = false) : void
    • Removes and optionally destroys children of the CasaMovieClip then destroys itself.
  • destroy : void
    • Removes any event listeners and stops all internal processes to help allow for prompt garbage collection.

Constructor

CasaMovieClip

public function CasaMovieClip (
)

Creates a new CasaMovieClip.

Instance properties

destroyed

public destroyed:Boolean
(read)

stage

override public stage:Stage
(read)

The Stage of the display object or if the display object is not added to the display list and StageReference is defined stage will return the default stage; otherwise null.

Instance methods

destroy

public function destroy (
) : void

Removes any event listeners and stops all internal processes to help allow for prompt garbage collection.

Always call stage before deleting last object pointer.
#

Calling destroy() on a CASA display object also removes it from its current parent.
Specified by:

removeChildren

public function removeChildren (
destroyChildren:Boolean = false, recursive:Boolean = false) : void

Removes and optionally destroys children of the CasaMovieClip.
Parameters:
destroyChildren:
If a child implements IDestroyable call its destroy method true, or don't destroy false; defaults to false.
recursive :
Call this method with the same arguments on all of the children's children (all the way down the display list) true, or leave the children's children false; defaults to false.

removeChildrenAndDestroy

public function removeChildrenAndDestroy (
destroyChildren:Boolean = false, recursive:Boolean = false) : void

Removes and optionally destroys children of the CasaMovieClip then destroys itself.
Parameters:
destroyChildren:
If a child implements IDestroyable call its destroy method true, or don't destroy false; defaults to false.
recursive :
Call this method with the same arguments on all of the children's children (all the way down the display list) true, or leave the children's children false; defaults to false.

removeEventListeners

public function removeEventListeners (
) : void

Removes all event listeners.
#

removeEventsForListener

public function removeEventsForListener (
listener:Function) : void

Removes all events that report to the specified listener.
#
Parameters:
listener:
The listener function that processes the event.
#

removeEventsForType

public function removeEventsForType (
type:String) : void

Removes all events of a specific type.
#
Parameters:
type:
The type of event.
#