Quantunet.com

My Account

Joins Us
Flash 8 Actionscript 2.0 Library
Drawing Color Gradient Filled Shapes  

   
How to draw this gradient filled rectangle with actionscript.

Actionscript

fillType = "linear";
colors = [0xF83680, 0x5844EA];
alphas = [100, 100];
ratios = [0, 255];

matrix = {
matrixType:"box", x:50, y:50, w:150, h:100, r:0/180*Math.PI
};

_root.lineStyle(1, 0x000000, 100);
_root.beginGradientFill(fillType, colors, alphas, ratios,matrix);
_root.moveTo(50, 50);
_root.lineTo(200, 50);
_root.lineTo(200, 150);
_root.lineTo(50, 150);
_root.lineTo(50, 50);
_root.endFill();


© 2007 Quantunet LLC All Rights Reserved | Intellectual Property | Terms of Use | Privacy
Home | About Quantunet | FAQ's | Contact Us