The DashedLine class provides a means to draw with standard drawing
methods but allows you to draw using dashed lines. Dashed lines are continuous
between drawing commands so dashes won't be interrupted when new lines
are drawn in succession
Use a DashedLine instance just as you would use a movie clip to draw lines
and fills using Flash's drawing API on a movie clip.
target
The target movie clip in which drawings are to be made
_curveaccuracy
A value representing the accuracy used in determining the length
of curveTo curves.
setDash
description:
Sets new lengths for dash sizes
usage:
No usage provided
parameters:
- onLength Length of visible dash lines.
- offLength Length of space between dash lines.
returns:
nothing
getDash
description:
Gets the current lengths for dash sizes
usage:
No usage provided
parameters:
returns:
Array containing the onLength and offLength values
respectively in that order
moveTo
description:
Moves the current drawing position in target to (x, y).
usage:
No usage provided
parameters:
- x An integer indicating the horizontal position relative to the registration point of
the parent movie clip.
- An integer indicating the vertical position relative to the registration point of the
parent movie clip.
returns:
nothing
lineTo
description:
Draws a dashed line in target using the current line style from the current drawing position
to (x, y); the current drawing position is then set to (x, y).
usage:
No usage provided
parameters:
- x An integer indicating the horizontal position relative to the registration point of
the parent movie clip.
- An integer indicating the vertical position relative to the registration point of the
parent movie clip.
returns:
nothing
curveTo
description:
Draws a dashed curve in target using the current line style from the current drawing position to
(x, y) using the control point specified by (cx, cy). The current drawing position is then set
to (x, y).
usage:
No usage provided
parameters:
- cx An integer that specifies the horizontal position of the control point relative to
the registration point of the parent movie clip.
- cy An integer that specifies the vertical position of the control point relative to the
registration point of the parent movie clip.
- x An integer that specifies the horizontal position of the next anchor point relative
to the registration. point of the parent movie clip.
- y An integer that specifies the vertical position of the next anchor point relative to
the registration point of the parent movie clip.
returns:
nothing
clear
description:
Clears the drawing in target
usage:
No usage provided
parameters:
returns:
nothing
lineStyle
description:
Sets the lineStyle for target
usage:
No usage provided
parameters:
- thickness An integer that indicates the thickness of the line in points; valid values
are 0 to 255. If a number is not specified, or if the parameter is undefined, a line is not
drawn. If a value of less than 0 is passed, Flash uses 0. The value 0 indicates hairline
thickness; the maximum thickness is 255. If a value greater than 255 is passed, the Flash
interpreter uses 255.
- rgb A hex color value (for example, red is 0xFF0000, blue is 0x0000FF, and so on) of
the line. If a value isn’t indicated, Flash uses 0x000000 (black).
- alpha An integer that indicates the alpha value of the line’s color; valid values are
0–100. If a value isn’t indicated, Flash uses 100 (solid). If the value is less than 0, Flash
uses 0; if the value is greater than 100, Flash uses 100.
returns:
nothing
beginFill
description:
Sets a basic fill style for target
usage:
No usage provided
parameters:
- rgb A hex color value (for example, red is 0xFF0000, blue is 0x0000FF, and so on). If
this value is not provided or is undefined, a fill is not created.
- alpha An integer between 0–100 that specifies the alpha value of the fill. If this value
is not provided, 100 (solid) is used. If the value is less than 0, Flash uses 0. If the value is
greater than 100, Flash uses 100.
returns:
nothing
beginGradientFill
description:
Sets a gradient fill style for target
usage:
No usage provided
parameters:
- fillType Either the string "linear" or the string "radial".
- colors An array of RGB hex color values to be used in the gradient (for example, red is
0xFF0000, blue is 0x0000FF, and so on).
- alphas An array of alpha values for the corresponding colors in the colors array; valid
values are 0–100. If the value is less than 0, Flash uses 0. If the value is greater than 100,
Flash uses 100.
- ratios An array of color distribution ratios; valid values are 0–255. This value defines
the percentage of the width where the color is sampled at 100 percent.
- matrix A transformation matrix that is an object with one of two sets of properties.
returns:
nothing
endFill
description:
Ends the fill style for target
usage:
No usage provided
parameters:
returns:
nothing