Packagenet.guttershark.display
Classpublic dynamic class MovieClipButton
InheritanceMovieClipButton Inheritance flash.display.MovieClip

The MovieClipButton class is a generic class you can bind any movie clip to in the Library, and get canned button states.

A frame in the movie clip represents a state that the button is in.

Default frame states:

Sound support is also available for each of the button states.

Sound Properties

This class also uses high priority event listeners for mouse events. When you set the locked property, all MouseEvents will not be dispatched. If you absolutely need mouse events even though the button is locked, you can add an event listener with a higher priority than 10.



Public Properties
 PropertyDefined by
  downFrame : int = 3
The frame to go to for the down state.
MovieClipButton
  downSound : String
The down sound to play.
MovieClipButton
  lockable : Boolean = false
Set whether or not this button is lockable.
MovieClipButton
  locked : Boolean
Lock or unlock the button.
MovieClipButton
  lockedFrame : int = 4
The frame to go to for the (optional) locked state.
MovieClipButton
  lockSound : String
The sound to play when this button is locked.
MovieClipButton
  normalFrame : int = 1
The frame to go to for the normal state.
MovieClipButton
  outSound : String
The out sound to play.
MovieClipButton
  overFrame : int = 2
The frame to go to for the over state.
MovieClipButton
  overSound : String
The over sound to play.
MovieClipButton
  unlockSound : String
The sound to play when this movie clip is unlocked.
MovieClipButton
  upSound : String
The up sound to play.
MovieClipButton
Public Methods
 MethodDefined by
  
Constructor for MovieClipButton instances.
MovieClipButton
Public Constants
 ConstantDefined by
  LOCKED : String = "locked"
[static] Event identifier for the locked state
MovieClipButton
  UNLOCKED : String = "unlocked"
[static] Event identifier for the unlocked state
MovieClipButton
Property detail
downFrameproperty
public var downFrame:int = 3

The frame to go to for the down state.

downSoundproperty 
public var downSound:String

The down sound to play. The SoundManager class is used internally here, so that sound should have been registered with the SoundManager previously.

lockableproperty 
public var lockable:Boolean = false

Set whether or not this button is lockable. If so, it uses the lockedFrame when enabled is set to false.

lockedproperty 
locked:Boolean  [read-write]

Lock or unlock the button.

Implementation
    public function get locked():Boolean
    public function set locked(value:Boolean):void
lockedFrameproperty 
public var lockedFrame:int = 4

The frame to go to for the (optional) locked state.

lockSoundproperty 
public var lockSound:String

The sound to play when this button is locked. The SoundManager class is used internally here, so that sound should have been registered with the SoundManager previously.

normalFrameproperty 
public var normalFrame:int = 1

The frame to go to for the normal state.

outSoundproperty 
public var outSound:String

The out sound to play. The SoundManager class is used internally here, so that sound should have been registered with the SoundManager previously.

overFrameproperty 
public var overFrame:int = 2

The frame to go to for the over state.

overSoundproperty 
public var overSound:String

The over sound to play. The SoundManager class is used internally here, so that sound should have been registered with the SoundManager previously.

unlockSoundproperty 
public var unlockSound:String

The sound to play when this movie clip is unlocked. The SoundManager class is used internally here, so that sound should have been registered with the SoundManager previously.

upSoundproperty 
public var upSound:String

The up sound to play. The SoundManager class is used internally here, so that sound should have been registered with the SoundManager previously.

Constructor detail
MovieClipButton()constructor
public function MovieClipButton()

Constructor for MovieClipButton instances. Generally you want to bind this class to a movie clip in the library.

Constant detail
LOCKEDconstant
public static const LOCKED:String = "locked"

Event identifier for the locked state

UNLOCKEDconstant 
public static const UNLOCKED:String = "unlocked"

Event identifier for the unlocked state