Posted By

mswallace on 06/07/07


Tagged

actionscript filter line api Drawing 3 Cured Glow


Versions (?)

Who likes this?

8 people have marked this snippet as a favorite

bartekk
copyleft
taboularasa
farrellj
ozke
THEPWN3R
tspitzr
albertomori


AS3 Curved Line Drawing API and Glow


 / Published in: ActionScript 3
 

  1. var lineDrawing:MovieClip = new MovieClip();
  2. this.addChild(lineDrawing);
  3.  
  4. lineDrawing.graphics.lineStyle(1, 0x000000, 1 );
  5. lineDrawing.graphics.beginFill( 0x990000, 1 );
  6. lineDrawing.graphics.moveTo(100,100);
  7. lineDrawing.graphics.lineTo(100,200);
  8. lineDrawing.graphics.lineTo(300,200);
  9. lineDrawing.graphics.lineTo(300,100);
  10. lineDrawing.graphics.curveTo(200,0, 100,100); //the first two numbers are your control point for the curve
  11.  
  12.  
  13. ///Glow Filter
  14. var glow:GlowFilter = new GlowFilter();
  15. glow.color = 0x009900;
  16. glow.alpha = 1;
  17. glow.blurX = 25;
  18. glow.blurY = 25;
  19.  
  20. var dropShadow:DropShadowFilter = new DropShadowFilter();
  21. dropShadow.color = 0x000000;
  22. dropShadow.blurX = 10;
  23. dropShadow.blurY = 10;
  24. dropShadow.angle = 0;
  25. dropShadow.alpha = 0.5;
  26. dropShadow.distance = 25;
  27.  
  28. var filtersArray:Array = new Array(glow, dropShadow);
  29. lineDrawing.filters = filtersArray;

Report this snippet  

You need to login to post a comment.