CoreMovieClip
Kind of class: | class |
---|---|
Inherits from: | MovieClip |
Implements: | |
Known subclasses: | |
Version: | 09/12/08 |
Author: | Aaron Clinger@auther Mike Creighton |
Classpath: | org.casalib.movieclip.CoreMovieClip |
File last modified: | Monday, 01 December 2008, 13:34:40 |
A core MovieClip to inherent from which extends Flash's built-in MovieClip class. All MovieClip classes should extend from here.
Summary
Class methods
- create (target:MovieClip, instanceName:String, depth:Number, initObject:Object) : CoreMovieClip
- Creates an empty instance of the CoreMovieClip class.
Instance methods
- toString : String
- Returns class description name.
- removeMovieClip : Void
- Removes the MovieClip after automatically calling destroy.
- destroy : Void
- Removes any internal variables, intervals, enter frames, internal MovieClips and event observers to allow the object to be garbage collected.
- removeMovieClip : Void
Class methods
create
static function create (
target:MovieClip,
instanceName:String,
depth:Number,
initObject:Object) : CoreMovieClip
Creates an empty instance of the CoreMovieClip class. Use this instead of a traditional
new
constructor statement due to limitations of ActionScript 2.0. Parameters:
target :
Location where the MovieClip should be attached.
instanceName:
A unique instance name for the MovieClip.
depth :
[optional] The depth level where the MovieClip is placed; defaults to next highest open depth.
initObject :
[optional] An object that contains properties with which to populate the newly attached MovieClip.
Returns:
- Returns a reference to the created instance.
Example:
-
var myCore_mc:CoreMovieClip = CoreMovieClip.create(this, "example_mc");
Usage note:
- If you want to extend a non empty MovieClip you can either define the ActionScript 2.0 class in the Flash IDE library or use org.casalib.util.MovieClipUtil.attachMovieRegisterClass.
Since:
- Flash Player 7
Instance methods
destroy
function destroy (
) : Void
Removes any internal variables, intervals, enter frames, internal MovieClips and event observers to allow the object to be garbage collected.
Always call
# Always call
new
before deleting last object pointer.Specified by:
removeMovieClip
function removeMovieClip (
) : Void
Removes the MovieClip after automatically calling destroy.
Usage note:
-
removeMovieClip
and destroy work identically; you can call either method to destroy and remove the MovieClip.