Recipe 7.2. Setting Gradient Line Styles


Problem

You want to draw lines using gradient styles.

Solution

Use the Graphics.lineGradientStyle( ) method.

Discussion

The lineGradientStyle( ) method allows you to draw lines with gradient styles. You must still call lineStyle( ) first. However, once you've set the basic line style properties, you can call lineGradientStyle( ) to apply a gradient style to lines. The parameters for the lineGradientStyle( ) method are exactly the same as the parameters for the beginGradientFill( ) method.

See Also

Recipe 7.13 for more about parameters.




ActionScript 3. 0 Cookbook
ActionScript 3.0 Cookbook: Solutions for Flash Platform and Flex Application Developers
ISBN: 0596526954
EAN: 2147483647
Year: 2007
Pages: 351

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net