MirrorImage

Package:
Class:
Inheritance:
biz.flashscript.animation
public class MirrorImage
Sprite
The MirrorImage class is used to create realistic reflection images of objects. When used in conjunction with dragging objects the mirror image will move with the objects. To create an instance of the MirrorImage use the constructor new MirrorImage() and add parameters as desired.

See also

   biz.flashscript.animation.MirrorImageAnim

Public Properties
Property Defined By
skewA : Number
Changing this property value will change the width of the mirror image.
MirrorImage
skewB : Number
Changing this property value will change the rotation of the mirror image.
MirrorImage
skewC : Number
Changing this property value will change the x position and when negative or positive the skew direction of the mirror image.
MirrorImage
skewD : Number
Changing this property value will change the y position of the mirror image.
MirrorImage
Public Methods
Method Defined By
MirrorImage()
Creates a new instance of the MirrorImage class.
MirrorImage
setBitmap(origClip:MovieClip, _alpha:Number=1, distance:int=0, blurX:int=5, blurY:int=5, haveMask:MovieClip=null):void  method
Will initiate the creation of a mirror image reflection of an object (must be MovieClip).
MirrorImage
Events
Event Defined By
All inherited events for the Sprite class. N/A
Property Detail
skewA property
skewA:Number [read-write]

Changing this property value will change the width of the mirror image.

The default value is 1.

Implementation

public function get skewA():Number
public function set skewA(value:Number):void
skewB property
skewB:Number [read-write]

Changing this property value will change the rotation of the mirror image.

The default value is 0.

Implementation

public function get skewB():Number
public function set skewB(value:Number):void
skewC property
skewC:Number [read-write]

Changing this property value will change the x position and when negative or positive the skew direction of the mirror image.

The default value is -0.3.

Implementation

public function get skewC():Number
public function set skewC(value:Number):void
skewD property
skewD:Number [read-write]

Changing this property value will change the y position of the mirror image.

The default value is -1.

Implementation

public function get skewD():Number
public function set skewD(value:Number):void
Constructor Detail
MirrorImage ()  Constructor
public function MirrorImage()
Intializes a new MirrorImage instance.
Method Detail

setBitmap()  method
public function setBitmap(origClip:MovieClip, _alpha:Number=1, distance:int=0, blurX:int=5, blurY:int=5, haveMask:MovieClip=null):void

This method will initiate the mirror image methods.

Parameters

  • origClip:MovieClip ____ Specifies the MovieClip to create a mirror image from.
  • _alpha:Number=1 ____ Allows to reduce the alpha value further.
  • distance:int=0 ____ Specifies the distance of the mirror image from the MovieClip .
  • blurX:int=5 ____ Specifies the amount of x blurring.
  • blurY:int=5 ____ Specifies the amount of y blurring.
  • haveMask:MovieClip=null ____ Specifies whether the mirror image should be on a separate MovieClip using a mask.
Examples
Create a new fla file and name it Mirrorimage.fla. Place the fla in the same folder as the biz folder. Create a MovieClip and place it on the timeline. Give the name mc. Then create an Actionscript file, name it Mirrorimage.as and place this script.
package 
{
	import flash.display.Sprite;
	import biz.flashscript.animation.MirrorImage;

	public class Mirrorimage extends Sprite
	{
		public function Mirrorimage ():void
		{
			var mi:MirrorImage = new MirrorImage();
			addChild (mi);
			mi.setBitmap (mc,0.8,15,5);
		}
	}
}