Posted By

mswallace on 06/07/07


Tagged

actionscript flash filter api Drawing 3 DropShadow


Versions (?)

Who likes this?

6 people have marked this snippet as a favorite

copyleft
Akuma99
THEPWN3R
sweetbabyyoung
nalmeida
tspitzr


AS3 Drawing API Line Drawing and DropShadow


 / Published in: ActionScript 3
 

Just some code that shows you how to set up the Drawing API and draw a line and also use the dropshadow filter.

  1. var lineDrawing:MovieClip = new MovieClip();
  2. this.addChild(lineDrawing);
  3.  
  4. lineDrawing.graphics.lineStyle(1);
  5. lineDrawing.graphics.moveTo(0,0); ///This is where we start drawing
  6. lineDrawing.graphics.lineTo(350, 600);
  7. lineDrawing.graphics.lineTo(600, 400);
  8.  
  9. var dropShadow:DropShadowFilter = new DropShadowFilter();
  10. dropShadow.color = 0x000000;
  11. dropShadow.blurX = 10;
  12. dropShadow.blurY = 10;
  13. dropShadow.angle = 0;
  14. dropShadow.alpha = 0.5;
  15. dropShadow.distance = 10;
  16.  
  17.  
  18. var filtersArray:Array = new Array(dropShadow);
  19. lineDrawing.filters = filtersArray;

Report this snippet  

You need to login to post a comment.