Frames 

 No Frames

Previous Element
PropertyDataSource

Next Element
Rect


RadialGradient

This defines a radial gradient fill for an enclosed area. The bounds of the gradient are specified with a center point and a pair of elliptical radii 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. When the radii are different values 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

cx X coordinate for the center point of the gradient.
TypeFloat
Default Value0
cy Y coordinate for the center point of the gradient.
TypeFloat
Default Value0
rxThe X radius of the gradient.
TypeFloat
Value Range>0
Default ValueNone
ryThe Y radius of the gradient.
TypeFloat
Value Range>0
Default ValueNone
rotate Optional attribute indicating a clockwise rotation in degrees of the gradient about the base location. Only used when the rx and ry attributes are different.
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
xDisp Prior to Flash 8, all radial gradients were uniform and it was not possible to adjust the center of the gradient without modifying the bounds of the gradient. The xDisp attribute was added in FLash 8 to allow the ceter of the gradient to be shifted left or right along the X axis woutout modifying the bounds of the gradient. This permits must more realistic effects alloing different gradient densities from a single gradient definition.
TypeFloat
From Value-100
To Value+100
Default Value0

Child Elements

Stop

Parent Elements

FillStylePair
FillStyles

Examples

Color Gradient Examples
Clipping and Text Clipping Example

Previous Element
PropertyDataSource

Next Element
Rect