Hot on the heels of our Perfect Alpha Reflections Quick Tip comes this excellent utility class for dynamically reflecting your display objects, courtesy of Martin Christov.
How do I use it?
Step 1:
Copy the ReflectEffect.as file into the classpath of your Flash project (or the same directory as your FLA if you’re not using classpaths).
Step 2:
In your code, create a new instance of the ReflectEffect class, passing it the display object that you want it to reflect, like so:
var reflect:ReflectEffect = new ReflectEffect(movieClipToReflect);
Step 3:
Create a new variable for your reflected object and add it to the stage (or wherever you like):
var reflectedDown:Bitmap = reflect.down(length, fade, offset, blur, alpha);
reflectedDown.y = movieClipToReflect.y + movieClipToReflect.height;
addChild( reflectedDown );
The functions reflect.down(), reflect.up(), reflect.left() and reflect.right() will return a Bitmap of your object reflected in that direction. (Only the “length” parameter is required, the rest are optional.) As you…
1007 readers
537 readersCreating a Reflection Container in Flex 4, Part II, the next episode in the gripping and suspenseful series CodeDependent, is now available from Adobe TV. This show is the sequel to the previous one, in which I showed how to create a simple container for an image and it's reflection ... that didn't look that
584 readersFew posts ago I introduced Dynamic Bitmap Split Function. This function allows you to split any Bitmap into any (reasonable) number of column and rows and use those parts separately.Here is one quick example of using this function together with Tweener class. Click on image to see live example.and here is code:import flash.display.Bitmap;import flash.display.BitmapData;import flash.utils.ByteArray;import
1807 readersWe present a custom AS3 class, RetroTV, that easily converts any DisplayObject, (possibly combined of Sprites, Video, Shapes, TextFields), to a retro television display. The display is complete with lines, noise, and distortion. The television
595 readersWe present a custom AS3 class, RetroTV, that easily converts any DisplayObject, (possibly combined of Sprites, Video, Shapes, TextFields), to a retro television display. The display is complete with lines, noise, and distortion. The television image is updated continuously in real time to reflect changes of the object on the TV display.
1726 readersIn this tutorial you’ll learn how to separate an image’s three different color channels to create an RGB shift effect. I’ll also show you some graphics tricks to mimic an old CRT display. Final Result Preview Here’s an example of the effect we’ll be creating: The main takeaway in this tutorial is going to be the RGB shifting
989 readersIn this tutorial we are going to create an unusual, but very cool kind of clock: a binary clock. Final Result Preview Let’s take a look at the final result we will be working towards: Step 1: What Does Binary Mean? Everyone knows how to count, but not everyone knows there are so many different ways to do so.
899 readers
1793 readersBrightness is an attribute of visual perception in which a source appears to be radiating or reflecting light. In this tutorial we will learn how to modify the brightness of a Display Object using ActionScript 3. Final Result Preview Let’s take a look at the final result we will be working towards: Step 1: Brief Overview Using the ColorTransform class
1276 readers
8,013
Subscribe to RSS headline updates from:
GurusUnleashed
Powered by FeedBurner
Curious what others are searching for? Below are the most popular search terms over the last 30 days.

