DropShadow

Package:
Class:
Inheritance:
biz.flashscript.filters
public class DropShadow
The DropShadow class gives a shadow to an object. To trigger use the constructor new DropShadow().
Public Methods
Method Defined By
DropShadow(myTarget:Object, myDistance:int=10, myAngle:int=45, myColor:uint=0x000000, myAlpha:Number=1, _blurX:int=8, _blurY:int=8, _strength:Number=0.65, _inner:Boolean=false, _knockout:Boolean=false):void DropShadow
Constructor Detail
DropShadow ()  Constructor
public function DropShadow(myTarget:Object, myDistance:int=10, myAngle:int=45, myColor:uint=0x000000, myAlpha:Number=1, _blurX:int=8, _blurY:int=8, _strength:Number=0.65, _inner:Boolean=false, _knockout:Boolean=false)
Intializes a new DropShadow instance with the specified parameters.

Parameters

  • myTarget:Object ____ The Shadow target.
  • myDistance:int=10 ____ Optional: Distance of the shadow to the object. Default is 10.
  • myAngle:int=45 ____ Optional: specifies the shadow angle position. Default is 45;
  • myColor:uint=0x000000 ____ Optional: specifies the shadow color. Default is 0x000000.
  • myAlpha:Number=1 ____ Optional: specifies the alpha value of the glow. Default is 1.
  • _blurX:int=8 ____ Optional: specifies the amount of blurring in x position. Default is 8;
  • _blurY:int=8 ____ Optional: specifies the amount of blurring in y position. Default is 8;
  • _strength:Number=0.65 ____ Optional: specifies the shadow strength. Default is 0.65;
  • _inner:Boolean=false ____ Optional: Indicates whether or not the shadow is an inner shadow. Default is false;
  • _knockout:Boolean=false ____ Optional: Applies a knockout effect (true), which effectively makes the object's fill transparent and reveals the background color of the document. Default is false.
Examples
Create a new fla file and name it Dropshadow.fla. Place the fla in the same folder as the biz folder. Add a MovieClip on the stage and name it myClip. Then create an Actionscript file, name it Dropshadow.as and place this script.
package 
{
	import flash.display.Sprite;
	import flash.display.MovieClip;
	import biz.flashscript.filters.DropShadow;

	public class Dropshadow extends Sprite
	{
		public var myClip:MovieClip;
		public function Dropshadow ():void
		{
			var myShadow:DropShadow = new DropShadow(myClip);
		}
	}
}