Home     Drop Shadow Filter     Blur Filter     Glow Filter     Bevel Effect     Bonus Effects

Drop Shadow Filter (1)

The DropShadowFilter class, nested inside flash.filters package , lets you add shadows to some objects in Flash, using Action Script or the Filters Panel (Window/Properties/Filters). This new feature available in Flash 8 has answered the prayers of many designers, because adding drop shadows in early versions of Flash meant importing a bitmap with an effect designed in other programs (like Adobe Photoshop). And because the formats that support transparency (gif, png) have the biggest size, the animations, when published on the internet, were frightening even for a high-speed connection. Another advantage is the fact that you can control the effect's parameters at run time with little Action Script knowledge, so read carefully the information presented next.

Open the stage, draw something (doesn't matter what) and convert it into a Movie Clip (right click on the shape). Click the new Symbol created and name it "mc" (in the Properties Panel; Windows/ Properties Panel/ Properties Panel). You can also open the source file and use our butterfly, also named "mc" (this name is often used in examples and stands for Movie Clip, but you can name it almost anything). With this name you can identify the object when you use Action Script to manipulate its properties.

 
 

The drop shadow's parameters are:

  • distance: Number(-32;32) = the value of the distance between the object and its shadow, measured in pixels;
    AS: [name].distance
  • angle : Number(0;359) = the angle of the shadow in degrees;
    AS: [name].angle
  • color: Number (0xRRGGBB) = the color of the shadow in hexadecimal;
    AS: [name].color
  • alpha: Number (0;100) = the alpha transparency of the color;
    AS: [name].alpha
  • blur X: Number (0;255) = the amount of horizontal blur;
    AS: [name].blurX
  • blur Y: Number (0;255) = the amount of vertical blur;
    AS: [name].blurY
  • strength : Number (0;255) = punch strength of the shadow;
    AS: [name].strength
  • quality: Number (0;15) = the number of blur effects applied to the shadow;
    AS: [name].quality
  • inner shadow: Boolean (true/ false) = true for inner shadow and false for outer shadow; the default value is false;
    AS: [name].inner
  • knockout: Boolean (true/ false) = if you chose true you will apply a knockout effect which means the fill of the object will disappear (full transparency) and you will see the background; the default value is false;
    AS: [name].knockout
  • hide object Boolean (true/ false) = if you chose true, the object will disappear and you will only see the shadow; the default value is false;
    AS: [name].hideObject
  • Next >

    Download .ZIP   Download .FLA