Quantunet.com

My Account

Joins Us
Flash 8 Actionscript 2.0 Knowledgebase
Drawing A Sine Wave I  

Download .fla

Actionscript

_root.createEmptyMovieClip('sinewave',1);
sinewave._x = 40;
sinewave._y = Stage.height/2;
resolution = 100;
xscale = 50;
yscale = 50;

sinewave.lineStyle(2,0xCC99FF,100);

for(i =0; i<= resolution; i++){
var angle = 2*Math.PI*i/resolution;
sinewave.lineTo(xscale*angle, yscale*Math.sin(angle));
}



How The Actionscript Works




© 2008 Quantunet LLC All Rights Reserved | Intellectual Property | Terms of Use | Privacy
Home | About Quantunet | FAQ's | Contact Us