# Loading Dynamic Text from onRelease

**URL:** <https://forum.kirupa.com/t/loading-dynamic-text-from-onrelease/25043>\
**Category:** flash\
**Created:** [July 8, 2003, 8:50pm UTC](https://forum.kirupa.com/t/loading-dynamic-text-from-onrelease/25043 "2003-07-08T20:50:36Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![tranism](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/tranism/32/269_2.png) [@tranism](https://forum.kirupa.com/u/tranism)\
**Post date:** [July 8, 2003, 8:50pm UTC](https://forum.kirupa.com/t/loading-dynamic-text-from-onrelease/25043/1 "2003-07-08T20:50:36Z")

</div>

[AS]on (release) {  
loadVarsText = new loadVars();  
loadVarsText.load(“findStores2.php?ctry=USA&ctry2=Canada”);  
loadVarsText.onLoad = function(success) {  
if (success) {  
trace(“done loading”);  
scroller.html = true;  
scroller.htmlText = this.textfield;  
} else {  
trace(“not loaded”);  
}  
}  
};[/AS]

So there’s my code. I have a button then needs to load some information dynamically into the scroller field through an on (release) event. What am i doing wrong?

---

<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:** [July 8, 2003, 9:45pm UTC](https://forum.kirupa.com/t/loading-dynamic-text-from-onrelease/25043/2 "2003-07-08T21:45:29Z")

</div>

scroller.htmlText = this.textfield;

You should point to the external variable being loaded from the text file, not the textfield…

scroller.htmlText = this.ExternalVariableBeingLoadedFromTheTextFile;

**And do not crosspost to gain others attention!!**

---

<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:** [July 8, 2003, 9:53pm UTC](https://forum.kirupa.com/t/loading-dynamic-text-from-onrelease/25043/3 "2003-07-08T21:53:30Z")

</div>

geez calm down man. I cross posted cuz I keep forgetting these are more actionscript related questions. Sorry.

---

<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:** [July 8, 2003, 9:56pm UTC](https://forum.kirupa.com/t/loading-dynamic-text-from-onrelease/25043/4 "2003-07-08T21:56:30Z")

</div>

i dont get it h88. i thought the variable for my external file is called “textfield”

---

<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:** [July 8, 2003, 9:58pm UTC](https://forum.kirupa.com/t/loading-dynamic-text-from-onrelease/25043/5 "2003-07-08T21:58:55Z")

</div>

Here is an example:

Your textfile content is:

```auto
var1=blah&var2=balhhh

```

Now to show var1’s value into the textfield, you would say, using the exact code above:

scroller.htmlText = this.var1;

---

<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:** [July 8, 2003, 10:03pm UTC](https://forum.kirupa.com/t/loading-dynamic-text-from-onrelease/25043/6 "2003-07-08T22:03:04Z")

</div>

ooooooooooohhhhhhhhhh, THANK YOU h88 🙂

---

<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:** [July 8, 2003, 10:14pm UTC](https://forum.kirupa.com/t/loading-dynamic-text-from-onrelease/25043/7 "2003-07-08T22:14:57Z")

</div>

h88

in my text file, the value is “textfield=”

so it looks like…

textfield=  
blah blah blah blah blah…

But its still not showing up in my text field box
