# Help with loading text

**URL:** <https://forum.kirupa.com/t/help-with-loading-text/259478>\
**Category:** Uncategorized\
**Created:** [May 5, 2008, 10:04pm UTC](https://forum.kirupa.com/t/help-with-loading-text/259478 "2008-05-05T22:04:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![enigma76](https://avatars.discourse-cdn.com/v4/letter/e/df788c/32.png) [@enigma76](https://forum.kirupa.com/u/enigma76)\
**Post date:** [May 5, 2008, 10:04pm UTC](https://forum.kirupa.com/t/help-with-loading-text/259478/1 "2008-05-05T22:04:41Z")

</div>

hi everybody  
I am using the accordeon menu [http://www.visual-blast.com/flash/accordion-style-flash-menu/](http://www.visual-blast.com/flash/accordion-style-flash-menu/)  
I made a textbox which appears from alpha = 0 to alpha = 50 and i would like to load different texts into it  
is it beter to do with xml ?  
i have tried to do with textbox+i but it didnt work  
any ideas???

top();  
speed = 10;  
initial\_width = 133;  
target\_width = 800;  
sp = rect1.\_x;  
this.createEmptyMovieClip(“emptymc”, 0);  
emptymc.onEnterFrame = function() {  
for (i=1; i\<=6; i++) {  
if (\_root.hit.hitTest(\_root.\_xmouse, \_root.\_ymouse, true)) {  
if (\_root[“rect”+i].hitTest(\_root.\_xmouse, \_root.\_ymouse, true)) {  
new\_x = (\_root.sp-(133\*(i-1)))-rect1.\_x;  
rect1.\_x += new\_x/speed;  
n\_width = target\_width-\_root[“rect”+i].\_width;  
\_root[“rect”+i].\_width += n\_width/speed;  
\_root[“movie”+i].textbox.\_alpha=50;  
} else {  
n\_width2 = initial\_width-\_root[“rect”+i].\_width;  
\_root[“rect”+i].\_width += n\_width2/speed;  
\_root[“movie”+i].textbox.\_alpha=0;  
}  
} else {  
new\_x = \_root.sp-rect1.\_x;  
rect1.\_x += new\_x/(speed+50);  
n\_width2 = initial\_width-\_root[“rect”+i].\_width;  
\_root[“rect”+i].\_width += n\_width2/(speed-1);  
\_root[“movie”+i].textbox.\_alpha=0;  
}  
\_root[“rect”+(i+1)].\_x = \_root[“rect”+i].\_x+\_root[“rect”+i].\_width;  
\_root[“movie”+i].\_x = \_root[“rect”+i].\_x-1;  
}  
};
