hi, has anyone tried to draw a sine curve with the flashMX drawing functions? everything I've done with drawTo() is pretty ugly looking. anyone had any sucess w/ this?
-fish
Printable View
hi, has anyone tried to draw a sine curve with the flashMX drawing functions? everything I've done with drawTo() is pretty ugly looking. anyone had any sucess w/ this?
-fish
lets see...maybe something like...
or something like that. play around with the wavelength, resolution and amplitude.Code:resolution=10;
wavelength=.5;
amplitude=50;
x=0;
y=200;
lineStyle(1,0,100);
moveTo(x,y);
onEnterFrame=function(){
if(x<550){
lineTo(x, y);
x+=resolution;
angle+=wavelength;
y=200+Math.sin(angle)*amplitude;
}
}