# Load text from different movie

**URL:** <https://forum.kirupa.com/t/load-text-from-different-movie/38785>\
**Category:** flash\
**Created:** [December 29, 2003, 9:39pm UTC](https://forum.kirupa.com/t/load-text-from-different-movie/38785 "2003-12-29T21:39:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmdt98](https://avatars.discourse-cdn.com/v4/letter/j/4491bb/32.png) [@jmdt98](https://forum.kirupa.com/u/jmdt98)\
**Post date:** [December 29, 2003, 9:39pm UTC](https://forum.kirupa.com/t/load-text-from-different-movie/38785/1 "2003-12-29T21:39:55Z")

</div>

I would like to be able to load a text file in one movie by clicking on a button in a different movie. Here is the script I am using from one of the tutorials:

on (release) {  
loadText = new loadVars();  
loadText.load(“TEXT1.txt”);  
loadText.onLoad = function(success) {  
if (success) {  
// trace(success);  
newsBox.html = true;  
newsBox.htmlText = this.myNews;  
}  
};  
}

I created a dynamic text box named “newsBox” in a movie called infoPg. I want to put the “on (release)” command on a button in a movie called nav\_tools. The nav\_tools movie is on the main timeline and the infoPg movie is loaded dynamically on the main timeline.

Also, do I need to put the text file on the same directory level as the flash file on my web server?

Any help would be great.

Jay

---

<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:** [December 30, 2003, 6:02am UTC](https://forum.kirupa.com/t/load-text-from-different-movie/38785/2 "2003-12-30T06:02:47Z")

</div>

localConnection:

```auto

// Code in the receiving movie
receiving_lc = new LocalConnection();
receiving_lc.methodToExecute = function(param1, param2) 
{ 
  // Code to be executed
}
receiving_lc.connect("lc_name");
// Code in the sending movie
sending_lc = new LocalConnection();
sending_lc.send("lc_name", "methodToExecute", dataItem1, dataItem2)

```
