I am very new to flash/Actionscript and am trying to understand how things work before I start any projects.
I was playing with the scroll bar today, and do not understand it’s behavior. I created a
dynamic text box called my_text and used the following code
for (var i=0;i<50;i++){
my_text.text += "this is a test" + i + "
";
}
Encouraged that it worked as expected, I tried it a little differently. I added an input text box called called in_text, and tried the following code.
in_text.addEventListener(KeyboardEvent.KEY_UP, onInputLineKey);
function onInputLineKey(e:KeyboardEvent):void {
if (e.keyCode == 13) { // ENTER was pressed
for (var i=0;i<50;i++){
my_text.text += in_text.text + i + "
";
}
}
}
This is what I do not understand. my_text was populated with the proper data, but my scroll bar was disabled. I could scroll through the list by highlighting the text, but that was it. What did i do wrong
thank you for your help