# Loading Multiple Text Files into one Dynamic Area

**URL:** https://forum.kirupa.com/t/loading-multiple-text-files-into-one-dynamic-area/265254
**Category:** flash
**Created:** [July 7, 2008, 2:40am UTC](https://forum.kirupa.com/t/loading-multiple-text-files-into-one-dynamic-area/265254 "2008-07-07T02:40:45Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![itsMeMicky](https://avatars.discourse-cdn.com/v4/letter/i/71c47a/32.png) [@itsMeMicky](https://forum.kirupa.com/u/itsMeMicky)
#### Post date: [July 7, 2008, 2:40am UTC](https://forum.kirupa.com/t/loading-multiple-text-files-into-one-dynamic-area/265254/1 "2008-07-07T02:40:45Z")

</div>

Good Afternoon Everyone !  
I am making an office calendar that allows text to be loaded when they press a button. I also want them to be able to link to certain html pages…and so forth  
I have the calendar done, and everything works…except the html.  
I have this embedded in each button

//Flash Script to Load on Button Press  
on (release){  
var variables\_lv:LoadVars = new LoadVars();  
variables\_lv.load(“july\_2\_event.txt”);  
variables\_lv.onData = function(data) {  
event\_loader\_clip.text=data;  
}  
}

but the html is not rendering…even if I have the rendering action pressed.  
“I am a rookie and this is frustrating”  
art-:stare:

---

<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 7, 2008, 3:42am UTC](https://forum.kirupa.com/t/loading-multiple-text-files-into-one-dynamic-area/265254/2 "2008-07-07T03:42:53Z")

</div>

Have you tried \_root?

```auto

_root.event_loader_clip.text=data;

```

---

<div class="post-metadata">

### Author: ![itsMeMicky](https://avatars.discourse-cdn.com/v4/letter/i/71c47a/32.png) [@itsMeMicky](https://forum.kirupa.com/u/itsMeMicky)
#### Post date: [July 7, 2008, 10:48am UTC](https://forum.kirupa.com/t/loading-multiple-text-files-into-one-dynamic-area/265254/3 "2008-07-07T10:48:39Z")

</div>

\_root didn’t work  
You know, when I declare variables on a single page I have no problems, but I can’t do that unless I put 30 different text areas on top of each other for each individual button. Pain in the \*\*\* !

“My IQ automatically upgrades to exceed yours”…thats funny !  
art-

---

<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 7, 2008, 12:12pm UTC](https://forum.kirupa.com/t/loading-multiple-text-files-into-one-dynamic-area/265254/4 "2008-07-07T12:12:13Z")

</div>

Seems like there’s only one text file. :\ Have you enabled embedded html on the textbox?

---

<div class="post-metadata">

### Author: ![itsMeMicky](https://avatars.discourse-cdn.com/v4/letter/i/71c47a/32.png) [@itsMeMicky](https://forum.kirupa.com/u/itsMeMicky)
#### Post date: [July 8, 2008, 12:20am UTC](https://forum.kirupa.com/t/loading-multiple-text-files-into-one-dynamic-area/265254/5 "2008-07-08T00:20:54Z")

</div>

unfortunately yes…what have I done ?  
Step 1 - I created a text file with no variables  
Step 2 - I embedded that code above  
Step 3 - I made the text area html readable, gave it an instance name

It all loads fantastic, but has no blasted links

---

<div class="post-metadata">

### Author: ![itsMeMicky](https://avatars.discourse-cdn.com/v4/letter/i/71c47a/32.png) [@itsMeMicky](https://forum.kirupa.com/u/itsMeMicky)
#### Post date: [July 8, 2008, 12:22am UTC](https://forum.kirupa.com/t/loading-multiple-text-files-into-one-dynamic-area/265254/6 "2008-07-08T00:22:33Z")

</div>

can you load multiple files into the same text area with a button, or do you have to keep layering them…

---

<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, 2008, 2:03am UTC](https://forum.kirupa.com/t/loading-multiple-text-files-into-one-dynamic-area/265254/7 "2008-07-08T02:03:44Z")

</div>

Yes you can…here’s an example:

```php
var files = ["birthday.txt","funtimes.txt"]; //What files?
for(var i = 0; i<files.length; i++){
var data = load(files*); //Load them
data.onLoad = function(){
_root.filetxt += this; //Add them
}
}

```

Or something like that…anyway.
