/ 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.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var lineDrawing:MovieClip = new MovieClip(); this.addChild(lineDrawing); lineDrawing.graphics.lineStyle(1); lineDrawing.graphics.moveTo(0,0); ///This is where we start drawing lineDrawing.graphics.lineTo(350, 600); lineDrawing.graphics.lineTo(600, 400); var dropShadow:DropShadowFilter = new DropShadowFilter(); dropShadow.color = 0x000000; dropShadow.blurX = 10; dropShadow.blurY = 10; dropShadow.angle = 0; dropShadow.alpha = 0.5; dropShadow.distance = 10; var filtersArray:Array = new Array(dropShadow); lineDrawing.filters = filtersArray;