lineGradientStyle("linear", [0xFFFF00, 0x00FFFF], [100, 100], [0x00, 0xFF], mxBox, "reflect", "linearRGB") : Gradient : Graphics Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Graphics » Gradient »

 

lineGradientStyle("linear", [0xFFFF00, 0x00FFFF], [100, 100], [0x00, 0xFF], mxBox, "reflect", "linearRGB")


 
package
{
    import flash.display.*;
    import flash.geom.Matrix;
    public class Main extends Sprite
    {
        public function Main()
        {
            var shape:Sprite = new Sprite();
            shape.x = 100;
            shape.y = 100;
    
            var mxBox:Matrix = new Matrix();
            mxBox.createGradientBox(200200);
    
            shape.graphics.lineStyle(25);
    
            shape.graphics.lineGradientStyle("linear"[0xFFFF000x00FFFF],  [100100][0x000xFF], mxBox, "reflect""linearRGB");
            shape.graphics.curveTo(200, -1004000);
            shape.graphics.lineTo(400200);
            shape.graphics.lineTo(0200);
            shape.graphics.lineTo(00);
            shape.graphics.endFill();
            addChild(shape);
        }
    }
}

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo Graphics
» Gradient