Loop over dynamic text box?

Hi Guys:
How do I loop some text over a dynamic text box.

I have a dynamic text box called (dyntext). I have a button below that Says “Click Here” or something to that effect.

Now, when I Click on the button, I have some code like

var i
for(int i=0;i<25;i++) {
dyn.text=“this is a test”;
}

but no dice. it only writes it once. not the 25 times like I want. it works in trace(“message”) but why not in a dynamic text box.

thanks guys.

jeyyu.

you’ll need to use the ‘+=’ operator…

for(int i=0;i<25;i++) {
dyn.text += "this is a test";
}

Thanks Ahmed:
That works!!!. how could I forget that after cs progz. doh!!. and just to the other folks readin this.
if u want to put in a new line character. just add
to the end of the string.
for(…) {
dyntext.text+="this is a text
";
}

Thanks Guys.

Jayc.