 
             //multiline resizable fields adjust their height
             if (this.sizeToHeight) {
-                var theight:Number = this.textfield.textHeight;
+                var theight:Number = tfield.textHeight;
                 if (theight == 0) theight = this.lineheight;
                 this.setHeight(theight + LzTextSprite.PAD_TEXTHEIGHT);
             }
-
-            //this.textfield.cacheAsBitmap = true;
         }
 
         /**

            }
            tf.letterSpacing = this.letterspacing;

            this.textfield.defaultTextFormat = tf;

            // measure sample text
            var text:String = this.textfield[this.html ? 'htmlText' : 'text'];
            this.textfield.text = "__ypgSAMPLE__";
            var lm:TextLineMetrics = this.textfield.getLineMetrics(0);
            this.textfield[this.html ? 'htmlText' : 'text'] = text;

            var lh:Number = lm.ascent + lm.descent + lm.leading;
            if (lh !== this.lineheight) {

        import flash.geom.Point;
        import flash.net.URLRequest;
        import flash.text.AntiAliasType;
        import flash.text.StyleSheet;
        import flash.text.TextField;
        import flash.text.TextFieldAutoSize;
        import flash.text.TextFormat;
