             this.textfield = createTextField(0,0,400,20);
         }
 
-        
         override public function setClickable( c:Boolean ):void {
-          if (this.clickable == c) return;
-
-          this.textfield.mouseEnabled = c || this.textfield.selectable;
-          this.setCancelBubbling();
-
-          this.clickable = c;
-          if (c) {
-              attachMouseEvents(this.textfield);
-          } else {
-              removeMouseEvents(this.textfield);
-          }
-      }
+            if (this.clickable == c) return;
+
+            this.textfield.mouseEnabled = c || this.textfield.selectable;
+            this.setCancelBubbling();
+
+            this.clickable = c;
+            if (c) {
+                attachMouseEvents(this.textfield);
+            } else {
+                removeMouseEvents(this.textfield);
+            }
+        }
 
         public function addScrollEventListener():void {
             this.textfield.addEventListener(flash.events.Event.SCROLL, __handleScrollEvent);
         }
 
-    function __handleScrollEvent(e:Event = null) {
-      if (scroll !== textfield.scrollV) {
-        scroll = textfield.scrollV;
-        //Debug.info('__handleScrollEvent', 'scrollTop', lineNoToPixel(textfield.scrollV));
-        owner.scrollevent('scrollTop', lineNoToPixel(textfield.scrollV));
-      }
-      if (maxscroll !== textfield.maxScrollV) {
-        maxscroll = textfield.maxScrollV;
-        //Debug.info('__handleScrollEvent', 'scrollHeight', lineNoToPixel(textfield.maxScrollV));
-        owner.scrollevent('scrollHeight', lineNoToPixel(textfield.maxScrollV) + height);
-      }
-      if (hscroll !== textfield.scrollH) {
-        hscroll = textfield.scrollH;
-        //Debug.info('__handleScrollEvent', 'scrollLeft', textfield.scrollH);
-        owner.scrollevent('scrollLeft', textfield.scrollH);
-      }
-      if (maxhscroll !== textfield.maxScrollH) {
-        maxhscroll = textfield.maxScrollH;
-        //Debug.info('__handleScrollEvent', 'scrollWidth', textfield.maxScrollH);
-        owner.scrollevent('scrollWidth', textfield.maxScrollH + width);
-      }
-    }
-
-
-      // turn on/off canceling of mouse event bubbling
-      private function setCancelBubbling():void {
-          var dobj:DisplayObject = this.textfield;
-
-          // base on the displayobject's mouseenabled property - on for selectable
-          var prevent = this.textfield.mouseEnabled;
-          // if clickable is on, we don't want to cancel events
-          if (this.clickable) prevent = false;
-
-          if (prevent) {
-              dobj.addEventListener(MouseEvent.CLICK, __ignoreMouseEvent);
-              dobj.addEventListener(MouseEvent.DOUBLE_CLICK, __ignoreMouseEvent);
-              dobj.addEventListener(MouseEvent.MOUSE_DOWN, __ignoreMouseEvent);
-              dobj.addEventListener(MouseEvent.MOUSE_UP, __ignoreMouseEvent);
-              dobj.addEventListener(MouseEvent.MOUSE_OVER, __ignoreMouseEvent);
-              dobj.addEventListener(MouseEvent.MOUSE_OUT, __ignoreMouseEvent);
-          } else {
-              dobj.removeEventListener(MouseEvent.CLICK, __ignoreMouseEvent);
-              dobj.removeEventListener(MouseEvent.DOUBLE_CLICK, __ignoreMouseEvent);
-              dobj.removeEventListener(MouseEvent.MOUSE_DOWN, __ignoreMouseEvent);
-              dobj.removeEventListener(MouseEvent.MOUSE_UP, __ignoreMouseEvent);
-              dobj.removeEventListener(MouseEvent.MOUSE_OVER, __ignoreMouseEvent);
-              dobj.removeEventListener(MouseEvent.MOUSE_OUT, __ignoreMouseEvent);
-          }
-      }
-
-      private function __ignoreMouseEvent(e:MouseEvent) :void {
-          if (e.type != MouseEvent.MOUSE_UP || LzMouseKernel.__lastMouseDown == this) {
-              // don't cancel "onmouseup" if another sprite was selected
-              e.stopPropagation();
-          }
-      }
+        function __handleScrollEvent(e:Event = null) :void {
+            if (scroll !== textfield.scrollV) {
+                scroll = textfield.scrollV;
+                //Debug.info('__handleScrollEvent', 'scrollTop', lineNoToPixel(textfield.scrollV));
+                owner.scrollevent('scrollTop', lineNoToPixel(textfield.scrollV));
+            }
+            if (maxscroll !== textfield.maxScrollV) {
+                maxscroll = textfield.maxScrollV;
+                //Debug.info('__handleScrollEvent', 'scrollHeight', lineNoToPixel(textfield.maxScrollV));
+                owner.scrollevent('scrollHeight', lineNoToPixel(textfield.maxScrollV) + height);
+            }
+            if (hscroll !== textfield.scrollH) {
+                hscroll = textfield.scrollH;
+                //Debug.info('__handleScrollEvent', 'scrollLeft', textfield.scrollH);
+                owner.scrollevent('scrollLeft', textfield.scrollH);
+            }
+            if (maxhscroll !== textfield.maxScrollH) {
+                maxhscroll = textfield.maxScrollH;
+                //Debug.info('__handleScrollEvent', 'scrollWidth', textfield.maxScrollH);
+                owner.scrollevent('scrollWidth', textfield.maxScrollH + width);
+            }
+        }
+
+
+        // turn on/off canceling of mouse event bubbling
+        private function setCancelBubbling():void {
+            var dobj:DisplayObject = this.textfield;
+
+            // base on the displayobject's mouseenabled property - on for selectable
+            var prevent = this.textfield.mouseEnabled;
+            // if clickable is on, we don't want to cancel events
+            if (this.clickable) prevent = false;
+
+            if (prevent) {
+                dobj.addEventListener(MouseEvent.CLICK, __ignoreMouseEvent);
+                dobj.addEventListener(MouseEvent.DOUBLE_CLICK, __ignoreMouseEvent);
+                dobj.addEventListener(MouseEvent.MOUSE_DOWN, __ignoreMouseEvent);
+                dobj.addEventListener(MouseEvent.MOUSE_UP, __ignoreMouseEvent);
+                dobj.addEventListener(MouseEvent.MOUSE_OVER, __ignoreMouseEvent);
+                dobj.addEventListener(MouseEvent.MOUSE_OUT, __ignoreMouseEvent);
+            } else {
+                dobj.removeEventListener(MouseEvent.CLICK, __ignoreMouseEvent);
+                dobj.removeEventListener(MouseEvent.DOUBLE_CLICK, __ignoreMouseEvent);
+                dobj.removeEventListener(MouseEvent.MOUSE_DOWN, __ignoreMouseEvent);
+                dobj.removeEventListener(MouseEvent.MOUSE_UP, __ignoreMouseEvent);
+                dobj.removeEventListener(MouseEvent.MOUSE_OVER, __ignoreMouseEvent);
+                dobj.removeEventListener(MouseEvent.MOUSE_OUT, __ignoreMouseEvent);
+            }
+        }
+
+        private function __ignoreMouseEvent(e:MouseEvent) :void {
+            if (e.type != MouseEvent.MOUSE_UP || LzMouseKernel.__lastMouseDown == this) {
+                // don't cancel "onmouseup" if another sprite was selected
+                e.stopPropagation();
+            }
+        }
 
         public function enableClickableLinks( enabled:Boolean):void {
             if (enabled) {

        }

        public function getTextfieldHeight ( ) {
            return this.textfield.height;
        }



function setHScroll(s:Number) {


            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 = lm.ascent + lm.descent + lm.leading;
            if (lh !== this.lineheight) {
              this.lineheight = lh;
