Reflection class

Hi,

I’ve created a Reflection class for AS 2. Yesterday I finished the 1.0 beta release. The class can create a reflection on a MovieClip. It is possible to position this reflection top,right,bottom,left. You can also apply Flash 8 filters to the reflection the same way you apply Flash 8 filters on regular MovieClips. One other cool feature is that you can apply a matrix on the reflection to transform it anyway you like. You can use that to skew the reflection and many other things. Nice stuff and worth to try and test!

Package: com.erwinverdonk.flash.effects
Class: Reflection

Properties:
[COLOR=Blue]matrix:Matrix;[/COLOR]
A matrix object to transform the reflection.

[COLOR=Blue]filters:Array;[/COLOR]
A filters array to apply filters to the reflection.

[COLOR=Blue]alpha:Number;[/COLOR]
A number to change the transparency of the reflection.

[COLOR=Blue]scaleY:Number;[/COLOR]
A number to change the height of the reflection in percentage.

[COLOR=Blue]position: String;[/COLOR]
A string of one of the following values top,right,bottom,left to change the position of the reflection. Even though you can change the value with one of these strings, it is better to change it with static class com.erwinverdonk.flash.effects.ReflectionPosition:

ReflectionPosition.TOP
ReflectionPosition.RIGHT
ReflectionPosition.BOTTOM
ReflectionPosition.LEFT

[COLOR=Blue]distance:Number;[/COLOR]
A number to change the distance between the MovieClip and the reflection.

[COLOR=Blue]interval:Number;[/COLOR]
A number to change the interval of the reflection update.

Methods:
[COLOR=Blue]Reflection(mc:MovieClip):Void[/COLOR]
Constructor

[COLOR=Blue]addReflection(alpha:Number, scaleY:Number, position: String, distance:Number, interval:Number):MovieClip[/COLOR]
Adds the reflection to the MovieClip and returns the reflection MovieClip.

[COLOR=Blue]removeReflection():Void[/COLOR]
Removes the reflection from the MovieClip.

[COLOR=Blue]updateReflection():MovieClip[/COLOR]
Updates the reflection of a MovieClip and returns the reflection MovieClip.

I hope to receive some good feedback from you guys! :smiley:

DEMO: http://www.erwinverdonk.com/Reflection_demo.html