--- In [email protected], "Firdosh Tangri" <[EMAIL PROTECTED]>
wrote:
>
> Can an empty Canvas( with backgroundColor)  have a dropShadow or corner
> radius effect
> 
> var aboutMe:Canvas=new Canvas();
>     aboutMe.width=this.width*(2/3);
>     aboutMe.height=this.height*(2/3);
>     aboutMe.setStyle("backgroundColor",0x333333);
>     aboutMe.setStyle("dropShadowEnabled",true);
>     aboutMe.setStyle("shadowDistance",3);
>     aboutMe.setStyle("shadowDirection","right");
>     aboutMe.setStyle("cornerRadius",6);
> 
>     aboutMe.x=(this.width/2) - (aboutMe.width/2);
>     aboutMe.y=(this.height/2) - (aboutMe.height/2);
>     mainCnvs.addChild(aboutMe);
> 
> I cannot see the shadow no matter what I do ,
> nor can I see the corner radius
> 
> 
> 
> 
> thanks
> cheers :)
> firdosh
>
You can add a DropShadowFilter to the canvas as long as it has a
background:

import flash.filters.*;
...
aboutMe.filters = [ new DropShadowFilter() ];


Reply via email to