A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: What is a MovieClip.curveTo?

  1. #1
    madskool.wordpress.com brutfood's Avatar
    Join Date
    Apr 2002
    The Flash MX documentation gives an example for drawing a circle - which does not actually draw a circle.

    _root.createEmptyMovieClip( "circle", 1 );
    with ( _root.circle )
    lineStyle( 0, 0x0000FF, 100 );
    beginFill( 0xFF0000 );
    moveTo( 500, 500 );
    curveTo( 600, 500, 600, 400 );
    curveTo( 600, 300, 500, 300 );
    curveTo( 400, 300, 400, 400 );
    curveTo( 400, 500, 500, 500 );

    Before I tried the example, I assumed that the lines between the control point and old and new anchor points defined the tangents at the ends of the curves - but perhaps not?

    My questions are as follows?

    1. How do I draw an exact circle using curveTo?

    2. What is the equation for what curveTo generates? Is it a trucated parabola/hyperbola or what?

  2. #2
    Join Date
    Aug 2002
    it is not a real curve since they only allow you to specify one control point. it's like a half bezier.

    The curveto specifies the end point of the segment and the control point that generates the curve.

  3. #3
    madskool.wordpress.com brutfood's Avatar
    Join Date
    Apr 2002
    So curveTo draws a bezier spline of degree one?

    Does anyone know the equation for this in terms of the control point and anchor point?

    If I knew this I may be able to work out a suitable approximation to circle quadrants.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center