coding in as3 is getting easier everyday but I'm not a guru yet. My code makes curvy lines. The problem is, is that i get this error

<pre>
TypeError: Error #1010: A term is undefined and has no properties.
at liner/::init()
at liner$iinit()
</pre>


this is my code

<pre>
package {
import flash.display.Sprite;
public class liner extends Sprite {
public function liner() {
init();


}
private function init():void
{
graphics.lineStyle(1,0xff0000,1);
graphics.moveTo(200,200);
var points:Array = new Array();
for (var i:int =0; i<10; i++) {
points[i]=new Object();
points[i].x=Math.random()*550;
points[i].y=Math.random()*110;


}
for (i =0; i<10; i++) {
var dx:Number=(points[i].x+points[i+1].x)/2;
var dy:Number=(points[i].y+points[i+1].y)/2;

graphics.curveTo(points[i].x,points[i].y,dx,dy);
}
}
}
}

</pre>

the code works so why do i get this 404?