A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: drawing sine curves w/ flashMX curveTo() and lineTo()

  1. #1
    Junior Member
    Join Date
    Nov 2000
    Posts
    12
    hey, does anyone have any experience drawing (or trying to draw) sine curves in flashMX w/ either curveTo() or lineTo()? I've managed to make very ugly aproximations with something like

    for (i = 0; i < 200; i++) {
    drawTo((cA+cB*i), (cC+sin(cD*i)));
    }

    ... with various values for the coefficients cA, cB, cC, and cD. I also tried some haphazard stuff with curveTo() that was so shockingly ugly and nonfunctional that I won't stoop to posting the code.

    anyway has anyone sucessfully done this?? I'd be very interested.

    thanks!

    -fish

  2. #2
    Arckid - Curving the Web
    Join Date
    Dec 2000
    Location
    India
    Posts
    1,412
    yeah ... did so many experiements with it .. its too cool.

  3. #3
    Arckid - Curving the Web
    Join Date
    Dec 2000
    Location
    India
    Posts
    1,412
    check this ...

    u must have microphone for this...

  4. #4
    Junior Member
    Join Date
    Nov 2001
    Posts
    21
    Yep i played around with drawing lines the first week i got MX you can get a faily nice sine wave but it is a little processor intensive.

    Heres a sample i did it calculate the amplitude and frequency of the wave depending on the position of the mouse.
    Let me know what you think.

    http://www.floppyfish.net/lab/mxlines.html

  5. #5
    always for rent
    Join Date
    Oct 2000
    Location
    Seattle
    Posts
    307

    one in flash 5...

    here's one in flash 5, all you have to do is replace all the 'attachMovie' commands with the appropriate 'moveTo' and 'lineTo' stuff.
    http://jeremydecker.s5.com/draw_circle.fla
    http://jeremydecker.s5.com/draw_circle.swf


    jeremy

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