# Dynamic Text not changing

**URL:** <https://forum.kirupa.com/t/dynamic-text-not-changing/1754>\
**Category:** Uncategorized\
**Created:** [May 30, 2002, 2:39am UTC](https://forum.kirupa.com/t/dynamic-text-not-changing/1754 "2002-05-30T02:39:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 30, 2002, 2:39am UTC](https://forum.kirupa.com/t/dynamic-text-not-changing/1754/1 "2002-05-30T02:39:31Z")

</div>

Ok, i have a dynamic text box and I want it to change when a button is pressed.

this button is contained within movie clip.

on(press){  
&nbsp &nbsp &nbsp &nbsp unloadMovie(\_root.mcBGLoader)  
&nbsp &nbsp &nbsp &nbsp \_root.scroller.text = \_root.nProduct  
&nbsp &nbsp &nbsp &nbsp loadMovie(“[http://www.angelfire.com/dc/vidgame/requiem/image3.swf](http://www.angelfire.com/dc/vidgame/requiem/image3.swf)”,\_root.mcBGLoader)  
}

this is the code to load the variables. its on the first frame of the main timeline

loadVarsText = new loadVars();  
loadVarsText.load(“[http://www10.brinkster.com/jubbaorf/requiem/flashtest/text.txt](http://www10.brinkster.com/jubbaorf/requiem/flashtest/text.txt)”);  
loadVarsText.onLoad = function(success) {  
&nbsp &nbsp &nbsp &nbsp if (success) {  
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp scroller.text = this.nNews;  
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp }  
};

what am i missing.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 30, 2002, 1:06pm UTC](https://forum.kirupa.com/t/dynamic-text-not-changing/1754/2 "2002-05-30T13:06:04Z")

</div>

it works on my machine…maybe the path to the text box is incorrect.  
🙂  
jeremy

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 30, 2002, 1:25pm UTC](https://forum.kirupa.com/t/dynamic-text-not-changing/1754/3 "2002-05-30T13:25:38Z")

</div>

all right thanks. I thought my coding was right. I’ll check the path.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 30, 2002, 2:59pm UTC](https://forum.kirupa.com/t/dynamic-text-not-changing/1754/4 "2002-05-30T14:59:18Z")

</div>

Thats strange. The only way that I could get it to work was if I put the LoadVarText code on each button and change the scroller that way. But that works fine. My path was correct for the other way but it just wasn’t working. It was saying that my variables were undefined. Oh, well. This works just as well…
