Scroll Bar Component

I can not seem to get the scroll bar to work on a txt box when loading an external txt file. If I had the txt manually or add a bunch of spaces the scroll bar will work. But it does not change dynamically based on the size of the text. The scroll bar does the dynamic change when pulling data from the database. Why not now. please help

Thanks

Here’s your answer.

http://www.macromedia.com/support/flash/ts/documents/dynamic_text_scrollmx.htm

And also: http://www.kirupa.com/developer/mx/dynamic_scroller.asp :slight_smile:

Cheers!
Kirupa :bandit:

Nice tute, Kir. But I couldn’t help noticing that you didn’t put the parameter to your onLoad function. I think you shoud do it, it can be useful.

pom :asian:

Hi kirupa,

can you convert your sample so that it does not load from a text file?

What I wanted to do was to be able to keep on adding text to the textbox on a button click… and the scroller will still work.

is that possible with the MX scroller component?

that should be possible, as long as you are able to load that variable.

I have tried to create a dynamic text box and keep adding text by button click…
what I did was simply:

on (release){
var1=var1+var1;
}

but the scroller component does not scroll when the amount of text exceed the text box area…according to what I have gather in this forum…this is due to the fact that the scroller component does not update its state and start scrolling…

Anybody got the solution to this?

Oh yeah, that’s weird. I couldn’t get it to work either… If someone has the answer, I’d be glad to hear it.

pom :stuck_out_tongue: