EasyManua.ls Logo

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT - Page 511

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT
816 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
MovieClip.lineTo() 511
Description
Method; specifies a line style that Flash uses for subsequent calls to lineTo() and curveTo()
until you call
lineStyle() with different parameters. You can call lineStyle() in the middle of
drawing a path to specify different styles for different line segments within a path.
Note: Calls to clear reset lineStyle() back to undefined.
Example
The following code draws a triangle with a 5-point, solid magenta line and no fill.
_root.createEmptyMovieClip( "triangle", 1 );
with ( _root.triangle )
{
lineStyle( 5, 0xff00ff, 100 );
moveTo( 200, 200 );
lineTo( 300,300 );
lineTo( 100, 300 );
lineTo( 200, 200 );
}
See also
MovieClip.beginFill()
, MovieClip.beginGradientFill(), MovieClip.clear(),
MovieClip.curveTo(), MovieClip.lineTo(), MovieClip.moveTo()
MovieClip.lineTo()
Availability
Flash Player 6.
Usage
my_mc.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 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.

Table of Contents

Related product manuals