| Flashscript classes (ActionScript 3) | Home | MX | MX 2004 | Flash 8 | Flash 9 |Flash 10 |PHP |Components | Snippets | Contact | |
MirrorImageAnim |
|
|
See also
| Property | Defined By |
|---|---|
|
skewA
: Number
Changing this property value will change the width of the mirror image. |
MirrorImageAnim |
|
skewB
: Number
Changing this property value will change the rotation of the mirror image. |
MirrorImageAnim |
|
skewC
: Number
Changing this property value will change the x position and when negative or positive the skew direction of the mirror image. |
MirrorImageAnim |
|
skewD
: Number
Changing this property value will change the y position of the mirror image. |
MirrorImageAnim |
| Method | Defined By |
|---|---|
|
MirrorImageAnim()
Creates a new instance of the MirrorImageAnim class. |
MirrorImageAnim |
|
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). |
MirrorImageAnim |
| 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. Implementationpublic function get skewA():Numberpublic 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. Implementationpublic function get skewB():Numberpublic 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. Implementationpublic function get skewC():Numberpublic 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. Implementationpublic function get skewD():Numberpublic function set skewD(value:Number):void |
| Constructor Detail |
|---|
|
MirrorImageAnim () Constructor
public function MirrorImageAnim() |
| Intializes a new MirrorImageAnim instance. |
| Method Detail |
|---|
|
setBitmap() method
This method will initiate the mirror image methods. |
Parameters
|
| Examples |
|---|
Create a new fla file and name it MirrorImageAnimExample.fla. Place the fla in the same folder as the biz folder. Create an animated MovieClip and place it on the timeline. Give the name
mc. Then create an Actionscript file, name it MirrorImageAnimExample.as and place this script.
package
{
import flash.display.Sprite;
import flash.display.MovieClip;
import flash.events.MouseEvent;
import biz.flashscript.animation.MirrorImageAnim;
public class MirrorImageAnimExample extends Sprite
{
private var mi:MirrorImageAnim;
public var mc:MovieClip;
public function MirrorImageAnimExample ():void
{
mi = new MirrorImageAnim();
addChild (mi);
mi.setBitmap (mc,1,-2);
mc.buttonMode = true;
mc.addEventListener (MouseEvent.MOUSE_DOWN,mo);
addEventListener (MouseEvent.MOUSE_UP,mu);
}
private function mo (e:MouseEvent):void
{
e.currentTarget.startDrag ();
}
private function mu (e:MouseEvent):void
{
stopDrag ();
}
}
}
|