888
ActionScript classes
If your SWF file includes a version 2 component, use the version 2 components
DepthManager class instead of the
MovieClip.getNextHighestDepth()
method, which is
used in this example.
See also
beginFill (MovieClip.beginFill method)
,
beginGradientFill
(MovieClip.beginGradientFill method)
,
clear (MovieClip.clear method)
,
curveTo
(MovieClip.curveTo method)
,
lineTo (MovieClip.lineTo method)
,
moveTo
(MovieClip.moveTo method)
lineTo (MovieClip.lineTo method)
public lineTo(x:Number, y:Number) : Void
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
lineTo()
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.
You can extend the methods and event handlers of the MovieClip class by creating a subclass.
Availability:
ActionScript 1.0; Flash Player 6
Parameters
x
:Number
- An integer that indicates the horizontal position relative to the registration point
of the parent movie clip.
y
:Number
- An integer that indicates the vertical position relative to the registration point of
the parent movie clip.
Example
The following example draws a triangle with a 5-pixel, solid magenta line and a partially
transparent blue fill:
this.createEmptyMovieClip("triangle_mc", 1);
triangle_mc.beginFill(0x0000FF, 30);
triangle_mc.lineStyle(5, 0xFF00FF, 100);
triangle_mc.moveTo(200, 200);
triangle_mc.lineTo(300, 300);
triangle_mc.lineTo(100, 300);
triangle_mc.lineTo(200, 200);
triangle_mc.endFill();
Summary of Contents for FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Page 1: ...ActionScript 2 0 Language Reference ...
Page 1352: ...1352 ActionScript classes ...