# Duplicating dynamic text box

**URL:** <https://forum.kirupa.com/t/duplicating-dynamic-text-box/97102>\
**Category:** Uncategorized\
**Created:** [December 17, 2003, 8:34pm UTC](https://forum.kirupa.com/t/duplicating-dynamic-text-box/97102 "2003-12-17T20:34:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lunatic](https://avatars.discourse-cdn.com/v4/letter/l/73ab20/32.png) [@lunatic](https://forum.kirupa.com/u/lunatic)\
**Post date:** [December 17, 2003, 8:34pm UTC](https://forum.kirupa.com/t/duplicating-dynamic-text-box/97102/1 "2003-12-17T20:34:43Z")

</div>

I can’t for the life of me figure out how this works. I have tried several different methods found in these forums and none work. I am trying to duplicate an MC 11 times - that works fine. But the MC has a dynamic text box centered on it. I would like the first one to say “1900” and each one after to be increased by 10. So the second one says “1910”, the third says “1920” and so on. I have this code on an MC called “timeline”. The MC I am trying to duplicate is called “bar” and is with “timeline”:

[AS]  
onClipEvent(load){  
for(i=0; i \< 12; i++) {  
\_root.timeline.bar.duplicateMovieClip(“copy”+i, i);  
ext = \_root.timeline[“copy”+i];  
ext.\_x = 125 \* i;  
ext.year.text = “1900” + 10;  
}}  
[/AS]

I have also tried this:  
[AS]  
amount = 11;  
year = 1900  
while (amount\>0) {  
duplicateMovieClip (\_root.timeline.bar, “mc”+i, i);  
\_root.timeline[“mc”+i].\_x=\_root.timeline.mc.\_x +(125\*i)  
\_root.timeline[“mc”+1].year.text += 10;  
i++;  
amount–;}}

[/AS]

but to no avail.

What am I not getting here? ☹

p.s. The dynamic text box on the bar MC is called “year”. I have tried making that the var as well as the instance name and still no luck. Which is it supposed to be?
