         var maxH :int = 0;
 
         for each (var tex :SwfTexture in _unpacked) {
-            const w :int = tex.w + (_borderSize * 2);
-            const h :int = tex.h + (_borderSize * 2);
+            const w :int = tex.w + (_textureBorderSize * 2);
+            const h :int = tex.h + (_textureBorderSize * 2);
             area += w * h;
             maxW = Math.max(maxW, w);
             maxH = Math.max(maxH, h);

        return p;
    }

    protected var _maxSize :int;
    protected var _borderSize :int;

    protected const _unpacked :Vector.<SwfTexture> = new Vector.<SwfTexture>();


            for (var ii :int = 0; ii < _unpacked.length; ++ii) {
                var unpacked :SwfTexture = _unpacked[ii];

                if (unpacked.w > _maxAtlasSize || unpacked.h > _maxAtlasSize) {
                    throw new Error("Too large to fit in an atlas: " + unpacked.w + ", " +
                        unpacked.h + " " + unpacked.symbol);
                }
