morpe

ombra

Apr 19th, 2011
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import flash.display.Sprite;
  2. import flash.filters.DropShadowFilter;
  3.  
  4. // Draw a box.
  5. var boxShadow:Sprite = new Sprite();
  6. boxShadow.graphics.lineStyle(1);
  7. boxShadow.graphics.beginFill(0xFF3300);
  8. boxShadow.graphics.drawRect(0, 0, 100, 100);
  9. boxShadow.graphics.endFill();
  10. addChild(boxShadow);
  11.  
  12. // Apply the drop shadow filter to the box.
  13. var shadow:DropShadowFilter = new DropShadowFilter();
  14. shadow.distance = 10;
  15. shadow.angle = 25;
  16.  
  17. // You can also set other properties, such as the shadow color,
  18. // alpha, amount of blur, strength, quality, and options for  
  19. // inner shadows and knockout effects.
  20.  
  21. boxShadow.filters = [shadow];
Advertisement
Add Comment
Please, Sign In to add comment