AQSet

Kind of class:class
Inherits from:none
Author:Arthur Clemens
Classpath:org.asapframework.util.actionqueue.AQSet
File last modified:Thursday, 12 October 2006, 11:19:40
ActionQueue methods to set various parameters/states of a movieclip.
Some of these methods use org.asapframework.util.MovieClipUtils.

Summary


Class methods
  • setVisible (inMC:MovieClip, inFlag:Boolean) : Void
    • Sets the visible state of a movieclip.
  • setAlpha (inMC:MovieClip, inAlpha:Number) : Void
    • Sets the alpha value of a movieclip.
  • setScale (inMC:MovieClip, inXScale:Number, inYScale:Number) : Void
    • Sets the scale of a movieclip.
  • setLoc (inMC:MovieClip, inX:Number, inY:Number, inOtherMC:MovieClip) : Void
    • Sets a movieclip to a location.
  • setToMouse (inMC:MovieClip) : Void
    • Sets a movieclip to the mouse location at moment of call.
  • centerOnStage (inMC:MovieClip, inOffset:Point) : Void
    • Sets a movieclip to the center of the stage.
  • setEnabled (inMC:MovieClip, inFlag:Boolean) : Void
    • Sets enabled state of movieclip.
  • setActive (inMC:MovieClip, inFlag:Boolean) : Void
    • Inactivates and activates the contents of a movieclip (including buttons and button clips).
  • unload (inMC:MovieClip) : Void
  • remove (inMC:MovieClip) : Void
  • setColor (inMC:MovieClip, inColorNumberValue:Number) : Void
  • setMask (inMC:MovieClip, inMaskMC:MovieClip) : Void
    • Sets a mask to a movieclip.

Class methods

centerOnStage

static function centerOnStage (
inMC:MovieClip, inOffset:Point) : Void

Sets a movieclip to the center of the stage.
Parameters:
inMC :
movieclip to set
inOffset:
(optional) the number of pixels to offset the clip from the center, defined as a Point object
Example:
  • This example centers the movieclip on the stage, with an offset of (50, 0):
    queue.addAction( AQSet.centerOnStage, my_mc, new Point(50,0) );

remove

static function remove (
inMC:MovieClip) : Void

Parameters:
inMC:
movieclip to remove
Example:
  • This example removes the movieclip:
    queue.addAction( AQSet.remove, my_mc );
Implementation note:
  • Calls removeMovieClip().

setActive

static function setActive (
inMC:MovieClip, inFlag:Boolean) : Void

Inactivates and activates the contents of a movieclip (including buttons and button clips).
Parameters:
inMC :
movieclip whose contents should be inactivated or activated
inFlag:
false: make inactive; true: make active
Example:
  • Disable all menu buttons by calling:
    queue.addAction( AQSet.setActive, menu_mc, false );
    To activate the menu buttons again, use:
    queue.addAction( AQSet.setActive, my_mc, true );

setAlpha

static function setAlpha (
inMC:MovieClip, inAlpha:Number) : Void

Sets the alpha value of a movieclip.
Parameters:
inMC :
movieclip to set the alpha value of
inAlpha:
new alpha value
Example:
  • This example sets the alpha of a movieclip to 50:
    queue.addAction( AQSet.setAlpha, my_mc, 50 );

setColor

static function setColor (
inMC:MovieClip, inColorNumberValue:Number) : Void

Deprecated Use AQColor.setColor.

setEnabled

static function setEnabled (
inMC:MovieClip, inFlag:Boolean) : Void

Sets enabled state of movieclip.
Parameters:
inMC :
movieclip to set enabled or disabled
inFlag:
enabled true or false
Example:
  • This example disables a movieclip:
    queue.addAction( AQSet.setEnabled, my_mc, false );

setLoc

static function setLoc (
inMC:MovieClip, inX:Number, inY:Number, inOtherMC:MovieClip) : Void

Sets a movieclip to a location.
Parameters:
inMC :
movieclip to move
inX :
new x location
inY :
new y location
inOtherMC:
(optional) movieclip inMC is set to the location of movieclip 'inOtherMC' with values of x and y as offset
Example:
  • This example sets the position of a movieclip:
    queue.addAction( AQSet.setLoc, my_mc, 100, 150 );
    This example sets the position of the movieclip to another movieclip with an offset of (10, 10):
    queue.addAction( AQSet.setLoc, my_mc, 10, 10, my_other_mc );

setMask

static function setMask (
inMC:MovieClip, inMaskMC:MovieClip) : Void

Sets a mask to a movieclip.
Parameters:
inMC :
movieclip to set mask to
inMaskMC:
mask clip
Example:
  • This example sets mask clip my_mask_mc to my_mc:
    queue.addAction( AQSet.setMask, my_mc, my_mask_mc );

setScale

static function setScale (
inMC:MovieClip, inXScale:Number, inYScale:Number) : Void

Sets the scale of a movieclip.
Parameters:
inMC :
movieclip to set the scale of
inXScale:
new xscale value
inYScale:
new yscale value
Example:
  • This example sets only the xscale of a movieclip:
    queue.addAction( AQSet.setScale, my_mc, 200, null );

setToMouse

static function setToMouse (
inMC:MovieClip) : Void

Sets a movieclip to the mouse location at moment of call.
Parameters:
inMC:
movieclip to set to the mouse location
Example:
  • This example sets the position of a movieclip to the mouse coordinates:
    queue.addAction( AQSet.setToMouse, my_mc );

setVisible

static function setVisible (
inMC:MovieClip, inFlag:Boolean) : Void

Sets the visible state of a movieclip.
Parameters:
inMC :
movieclip to set visible or invisible
inFlag:
true: visible; false: invisible
Example:
  • This example hides a movieclip:
    queue.addAction( AQSet.setVisible, my_mc, false );

unload

static function unload (
inMC:MovieClip) : Void

Parameters:
inMC:
movieclip to unload
Example:
  • This example unloads the movieclip:
    queue.addAction( AQSet.unload, my_mc );
Implementation note:
  • Calls MovieClip.unloadMovie().