M > MovieClip.lineTo |
![]() ![]() ![]() |
MovieClip.lineTo
Availability
Flash Player 6.
Usage
myMovieClip
.lineTo (
x
,
y
)
Parameters
x
An integer indicating the horizontal position relative to the registration point of the parent movie clip.
y
An integer indicating the vertical position relative to the registration point of the parent movie clip.
Returns
Nothing.
Description
Method; draws a line using the current line style from the current drawing position to (x
, y
); the current drawing position is then set to (x
, y
). If the movie clip that you are drawing in contains content that was created with the Flash drawing tools, - calls to lineTo
are drawn underneath the content. If you call the lineTo
method before any calls to the moveTo
method, the current drawing position defaults to (0
, 0
). If any of the parameters are missing, this method fails and the current drawing position is not changed.
Example
The following example draws a triangle with no lines and a partially transparent blue fill.
_root.createEmptyMovieClip ("triangle", 1); with (_root.triangle){ beginFill (0x0000FF, 50); lineStyle (5, 0xFF00FF, 100); moveTo (200, 200); lineTo (300, 300); lineTo (100, 300); lineTo (200, 200); endFill(); }
See also
MovieClip.beginFill
, MovieClip.createEmptyMovieClip
,
MovieClip.endFill
, MovieClip.lineStyle
, MovieClip.moveTo
![]() ![]() ![]() |