![]() ![]() | |
Flash Player 6.
my_mc.moveTo(x, y)
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.
Nothing.
Method; moves the current drawing position to (x, y). If any of the parameters are missing, this method fails and the current drawing position is not changed.
This example draws a triangle with 5-point, solid magenta lines and no fill. The first line creates an empty movie clip to draw with. Inside the with statement, a line type is defined; then the starting drawing position is indicated by the moveTo() method.
_root.createEmptyMovieClip( "triangle", 1 );
with ( _root.triangle )
{
lineStyle( 5, 0xff00ff, 100 );
moveTo( 200, 200 );
lineTo( 300,300 );
lineTo( 100, 300 );
lineTo( 200, 200 );
}
MovieClip.createEmptyMovieClip(), MovieClip.lineStyle(), MovieClip.lineTo()
![]() ![]() | |