Import FL. controls. uiscrollbar; <br/> var my_text_jieshou = new textfield (); <br/> my_text_jieshou.type = textfieldtype. input; <br/> my_text_jieshou.x = 20; <br/> my_text_jieshou.y = 40; <br/> my_text_jieshou.width = 452; <br/> my_text_jieshou.height = 210; <br/> my_text_jieshou.text = "Welcome... "; <br/> my_text_jieshou.border = true; <br/> // wrap automatically <br/> my_text_jieshou.wordwrap = true; <br/> // multi-line text <br/> my_text_jieshou.multiline = true; <br/> latency = 0 xcccccccc; <br/> latency (my_text_jieshou.length, my_text_jieshou.length ); <br/> addchild (my_text_jieshou); <br/> var my_text_scroo: uiscrollbar = new uiscrollbar (); <br/> my_text_scroo.x = 500; <br/> Limit = 40; <br/> my_text_scroo.height = 210; <br/> callback = my_text_jieshou; <br/> // setTimeout (addhandler, 100); <br/> // function addhandler (): void {<br/> my_text_scroo.update () <br/> my_text_scroo.scrollposition = dynamic; <br/>/}< br/> addchild (my_text_scroo); <br/>
Import FL. controls. uiscrollbar; <br/> var my_text_jieshou = new textfield (); <br/> my_text_jieshou.type = textfieldtype. input; <br/> my_text_jieshou.x = 20; <br/> my_text_jieshou.y = 40; <br/> my_text_jieshou.width = 452; <br/> my_text_jieshou.height = 210; <br/> my_text_jieshou.text = "Welcome... "; <br/> my_text_jieshou.border = true; <br/> // wrap automatically <br/> my_text_jieshou.wordwrap = true; <br/> // multi-line text <br/> my_text_jieshou.multiline = true; <br/> latency = 0 xcccccccc; <br/> latency (my_text_jieshou.length, my_text_jieshou.length ); <br/> addchild (my_text_jieshou); <br/> var my_text_scroo: uiscrollbar = new uiscrollbar (); <br/> my_text_scroo.x = 500; <br/> Limit = 40; <br/> my_text_scroo.height = 210; <br/> my_text_scroo.scrolltarget = my_text_jieshou; <br/> setTimeout (addhandler, 100); <br/> function addhandler (): void {<br/> my_text_scroo.scrollposition = my_text_scroo.maxscrollposition; <br/>}< br/> addchild (my_text_scroo );
That is to say, if the latency function is used, you do not need updata ();