# Loading external text into a dynamic text box inside a movieclip

**URL:** https://forum.kirupa.com/t/loading-external-text-into-a-dynamic-text-box-inside-a-movieclip/304969
**Category:** flash
**Created:** [February 17, 2010, 11:40am UTC](https://forum.kirupa.com/t/loading-external-text-into-a-dynamic-text-box-inside-a-movieclip/304969 "2010-02-17T11:40:23Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![kirupaak](https://avatars.discourse-cdn.com/v4/letter/k/ecae2f/32.png) [@kirupaak](https://forum.kirupa.com/u/kirupaak)
#### Post date: [February 17, 2010, 11:40am UTC](https://forum.kirupa.com/t/loading-external-text-into-a-dynamic-text-box-inside-a-movieclip/304969/1 "2010-02-17T11:40:23Z")

</div>

I have a scrollbar that uses a movieclip-instance name “text” to display dynamic text.

On the main timeline I used the following code:

myLoadVars = new LoadVars();  
myLoadVars.onLoad = function() {  
dynamictextcontent.htmlText = myLoadVars.dynamictextvariable\_html;  
}  
myLoadVars.load(“content/dynamictextcontent.txt”);

On the main timeline this would correctly load the variable “dynamictextvariable\_html” from content/dynamictextcontent"

But now it is in a movieclip called “text” I’m not sure of the code to make this work.

Any help would be appreciated.

Thanks
