Access keys

LockingMovieClip

Kind of class: class
Inherits from: StatedMovieClip < CoreMovieClip < MovieClip
Implements:
Version: 12/14/06
Author: Toby Boudreaux, Aaron Clinger
Classpath: org.casaframework.movieclip.LockingMovieClip
File last modified: Monday, 08 January 2007, 09:57:51
Extends StatedMovieClip and creates a locking interface for MovieClips.


This is different then using the enabled property because it completly removes all MovieClip EventHandlers and properties specified; does not only disable button events.
Example:
this.attachMovie("lockingMovieClip", "locking_mc", 20);

this.locking_mc.onRelease = function():Void {
    trace("I am unlocked.");
}

this.locking_mc.lock();

or is you only want to lock certain EventHandlers:
this.attachMovie("lockingMovieClip", "locking_mc", 20);

this.locking_mc.onRelease = function():Void {
    trace("I am unlocked.");
}

this.locking_mc.onRollOver = function():Void {
    this.gotoAndStop("rollOver");
}

this.locking_mc.onRollOut = this.locking_mc.onReleaseOutside = function():Void {
    this.gotoAndStop("rollOut");
}

this.locking_mc.lock(new Array("onRelease"));

Summary

Instance properties
Instance properties inherited from StatedMovieClip
Instance properties inherited from CoreMovieClip

Instance methods

destroy

function destroy (
) : Void
Removes internal variables, intervals, enter frames, internal MovieClips and event observers to allow the object to be garbage collected.

Always call destroy() before deleting/removing object instance.
#

isLocked

function isLocked (
) : Boolean
Returns:
Returns true if currently locked; otherwise false.
#

lock

function lock (
inclusionList:Array) : Void
Stores and removes EventHandlers to prevent them from triggering.
#
Parameters:
inclusionList:
[optional] List of EventHandlers and properties to lock. Defaults to all MovieClip EventHandlers.
#

toggle

function toggle (
) : Void
Switches the current state to the opposite state; between lock and unlock.
#

unlock

function unlock (
) : Void
Restores "locked" EventHandlers.
#