There are two approaches you can take. Either adjust the frequency directly in the loop or take into account the i:
This one basically adjusts the frequency based upon the x position.
Code:
for (var i:uint = 0; i <= stage.stageWidth; i++) {
var amplitude:Number = Math.sin((frequency+i/10) * Math.PI*2 * i/stage.stageWidth);
graphics.lineTo(i, axisY - amplitude*amplitudeMultiplier);
}
This basically keeps increasing the frequency based upon the number of loops run.
Code:
for (var i:uint = 0; i <= stage.stageWidth; i++) {
var amplitude:Number = Math.sin(frequency * Math.PI*2 * i/stage.stageWidth);
frequency+=frequency/100;
graphics.lineTo(i, axisY - amplitude*amplitudeMultiplier);
}
Either one will work but the one based upon x position would probably be simpler in some ways.