Frames 

 No Frames

Previous Element
Line

Next Element
LineStyle


LinearGradient

This defines a linear gradient fill for an enclosed area. The bounds of the gradient are specified with a base point and a distance over which the gradient is rendered. A gradient can have up to eight stop points each defining a percentage offset from the start of the ramp and a color. Colors are interpolated between the stop points from left to right to create the color ramp. At least two gradient stop points must be specified. All area to the left of the ramp are padded with the first ramp color and all colors to tight of the ramp are padded with the final color. The ramp can be rotated around the base point. The color offsets of stop points must be in ascending order and where two adjacent stop points are specified with the same offset all colors to the left of the specified offset will ramp to the first color and colors to the right will ramp from the second color.

Attributes

x X coordinate for the base point of the gradient.
TypeFloat
Default Value0
y Y coordinate for the base point of the gradient. Only used when the gradient is rotated.
TypeFloat
Default Value0
lengthThe length of the gradient.
TypeFloat
Default ValueNone
rotate Optional attribute indicating a clockwise rotation in degrees of the gradient about the base location.
TypeFloat
Default Value0
index Specifies the index of the current entry in the table. Informational attribute produced on decompilation. Not used on input.
TypeInteger
linearRGB Flash renders all gradients in a manner that produces different output from those of other applications. Flash 8 has added a new flag to gradient fills that permits the gradient to be interpolated using a linear RGB interpolation which is used for SVG-like gradients.
Values
no
The gradient should be rendered using normal Flash interpolation
yes
The gradient should be rendered using an SVG-compatible interpolation
Default Valueno
spreadMethod Prior to Flash 8, the color outside the defined gradient box was the same color as the terminal gradient colors. Flash 8 provides additional control over the colors outside of the gradient box by allowing two additional overflow modes: 'repeat', and 'reflect'
Values
pad
The colors outside the gradient box are painted with the terminal colors of the gradient
repeat
The gradient box is repeated for the entire fill area
reflect
The gradient box is mirrored creating a reflected gradient for the entire fill area
Default Valuepad

Child Elements

Stop

Parent Elements

FillStylePair
FillStyles

Examples

Color Gradient Examples
MorphShape Example

Previous Element
Line

Next Element
LineStyle