Scroll bar isnt scrolling
I tried to input a text from a css, which its height is greater than the target text field, so a scroll bar was placed.
but I was wonder that why the scroll bar doesnt enable scrolling after loading the text.
thanks
import fl.text.TLFTextField;
import fl.controls.UIScrollBar;
var loader:URLLoader = new URLLoader();
var targetXML:XML = new XML();
var txtField:TLFTextField = new TLFTextField();
var scrollBar:UIScrollBar = new UIScrollBar();
txtField.width = 300;
txtField.height = 300;
addChild(txtField);
scrollBar.x = txtField.width + scrollBar.width;
scrollBar.height = txtField.height;
addChild(scrollBar);
loader.load(new URLRequest("http://blahblahblah"));
loader.addEventListener("complete", loadComplete);
function loadComplete(e):void {
targetXML = XML(loader.data);
txtField.htmlText = targetXML.channel.item[0].description;
}