Movieclip.lineto() - MACROMEDIA FLASH MX 2004-ACTIONSCRIPT LANGUAGE Reference

Actionscript language reference
Table of Contents

Advertisement

MovieClip.lineTo()

Availability
Flash Player 6.
Usage
my_mc.lineTo(x:Number, y:Number) : Void
Parameters
An integer indicating the horizontal position relative to the registration point of the parent
x
movie clip.
An integer indicating the vertical position relative to the registration point of the parent
y
movie clip.
Returns
Nothing.
Description
Method; draws a line using the current line style from the current drawing position to (
current drawing position is then set to (
content that was created with the Flash drawing tools, calls to
the content. If you call
position defaults to (
drawing position is not changed.
You can extend the methods and event handlers of the MovieClip class by creating a subclass. For
more information, see "Assigning a class to a movie clip symbol" in Using ActionScript in Flash.
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();
See also
MovieClip.beginFill(), MovieClip.createEmptyMovieClip(), MovieClip.endFill(),
MovieClip.lineStyle(),
,
x
y
before any calls to the
lineTo()
,
). If any of the parameters are missing, this method fails and the current
0
0
MovieClip.moveTo()
). If the movie clip that you are drawing in contains
lineTo()
moveTo()
,
x
are drawn underneath
method, the current drawing
MovieClip.lineTo()
); the
y
537

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flash mx

Table of Contents