lineTo()
Top  Previous  Next


SWiSH Player Support
SWF6 or later - Not Supported (Use File | Test | Browser/Player)

Syntax
mySprite.lineTo(x,y)

Arguments
x: the horizontal position for the line to draw to
y: the vertical position for the line to draw to

Returns
Nothing.

Description
Method; draws a line from the current drawing position (set by a moveTo method) to the position defined by the x and y arguments. After the line is drawn the drawing position resets to the position set by those arguments. Lines are drawn underneath any objects placed inside the Sprite from SWiSH (such as images, shapes, buttons, etc.). If no drawing position is set by a moveTo method, then the drawing position defaults to 0,0. If any of the arguments are omitted, the function will fail.