Custom Graphical Classes
package { import flash.display.Shape; import flash.display.*; public class Rectangle extends Shape { public function Rectangle (w:Number, h:Number, lineThickness:Number, lineColor:uint, fillColor:uint) { graphics.lineStyle(lineThickness, lineColor); graphics.beginFill(fillColor, 1); graphics.drawRect(0, 0, w, h); } } }
1. | Shape Demo | ||
2. | Filling Shapes | ||
3. | Filling a Shape with a Solid or Translucent Color | ||
4. | Filling a Shape with a Gradient |