Actionscript Classes: variable reference within method not recognized
<p>Whenever I try to access a variable within a class method, Flash gives the error message: <em>Access of undefined variable</em></p>

<p>This is true for variables vertices, i, deltap, etc. below. All of these should be defined for the whole class, as far as I can see. What am I missing?</p>

<pre><code>package 
{ 
    import flash.display.Shape;
    import flash.display.Graphics;
    import fl.motion.Color;

    public dynamic class Quadrilateral extends Shape {
        public var vertices:Array = new Array();
        public var endvertices:Array; 
        public var angle:Number;
        public var mycolor:Color;
        private var steps:Number;
        private var deltap:Array = new Array(4);
        private var i:Number;

        public function Quadrilateral(vertexlist, fillcolor, stepcount=100) {
            vertices = vertexlist;
            mycolor = fillcolor;
            steps = stepcount;
            drawme()
        }
        public static function setfinal(vertexlist) {
            endvertices = vertexlist;
            for (i=0;i&lt;4;i++) {
                deltap[i] = (endvertices[i] - vertices[i])/100;
            }
        }
}
</code></pre>