# Load Text Dynamicly

**URL:** <https://forum.kirupa.com/t/load-text-dynamicly/38753>\
**Category:** Uncategorized\
**Created:** [December 29, 2003, 1:19pm UTC](https://forum.kirupa.com/t/load-text-dynamicly/38753 "2003-12-29T13:19:18Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![FlashSwimmer](https://avatars.discourse-cdn.com/v4/letter/f/35a633/32.png) [@FlashSwimmer](https://forum.kirupa.com/u/FlashSwimmer)\
**Post date:** [December 29, 2003, 1:19pm UTC](https://forum.kirupa.com/t/load-text-dynamicly/38753/1 "2003-12-29T13:19:18Z")

</div>

hi guys…  
i know it’s very simple question but i don’t know what is the reason…

i’ve main SWF whichis load mc\_dataHolder… it works  
mc\_dataHolder which is load text file ok… everything was great.

main SWF in FLA folder  
mc\_dataHolder in SWF folder  
text in text folder

when i put the text in the text folder i can’t see text it’s load the SWF no problem in it. but there is no text appear… Ⓜ

if i run mc\_dataHolder lonly it loads text file no problem.  
i don’t know what is the problem… i spent the night trying to solve it alone but i couldn’t.

i asked for this before:  
my preloader appear in 70% precent… i want to tell you that i removed the components from my file and make load in separat mc … of course after loading complete (-:

---

<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 29, 2003, 2:01pm UTC](https://forum.kirupa.com/t/load-text-dynamicly/38753/2 "2003-12-29T14:01:09Z")

</div>

Do you have a mask in your main.swf ? If it’s the case, embed your fonts. If not, post your files it would be easier to see what’s wrong with it.  
Ubik

---

<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 29, 2003, 11:30pm UTC](https://forum.kirupa.com/t/load-text-dynamicly/38753/3 "2003-12-29T23:30:41Z")

</div>

no masks in any layer… :puzzled:  
here are the files as i used in my PC :pleased:

---

<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, 2:06am UTC](https://forum.kirupa.com/t/load-text-dynamicly/38753/4 "2003-12-30T02:06:57Z")

</div>

hi guys… 😉  
i tried everything to make it load in the main SWF but i faild… :hangover: :hangover: . i don’t know what is the problem is… so can anyone help me please … i’m going to kill myself :jail: .

---

<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, 3:37am UTC](https://forum.kirupa.com/t/load-text-dynamicly/38753/5 "2003-12-30T03:37:33Z")

</div>

I think you are not setting the right path to the textfile.

---

<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, 4:19am UTC](https://forum.kirupa.com/t/load-text-dynamicly/38753/6 "2003-12-30T04:19:35Z")

</div>

this is the code in the bgDataHolder  
[AS]onClipEvent (load) {  
loadText = new loadVars();  
loadText.load("…/text/textNews.txt");  
loadText.onLoad = function(success) {  
if (success) {  
trace(success);  
\_root.mc\_textHolder.newsBox.html = true;  
\_root.mc\_textHolder.newsBox.htmlText = this.myNews;  
}  
};  
}  
[/AS]  
:sigh:

---

<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, 4:32am UTC](https://forum.kirupa.com/t/load-text-dynamicly/38753/7 "2003-12-30T04:32:38Z")

</div>

```auto
onClipEvent (load) {
        loadText = new loadVars();
        loadText.load("../text/textNews.txt");
        loadText.onLoad = function(success) {
                if (success) {
                        trace(success);
                        mc_textHolder.newsBox.html = true;
                        mc_textHolder.newsBox.htmlText = this.myNews;
                }
        };
}

```

---

<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, 4:43am UTC](https://forum.kirupa.com/t/load-text-dynamicly/38753/8 "2003-12-30T04:43:14Z")

</div>

[AS]mc\_textHolder.newsBox.html = true;  
mc\_textHolder.newsBox.htmlText = this.myNews;[/AS]  
you put me in the right way… i think you know it’ wouldn’t work :sigh: but i got what you mean claudio… 🍺 .  
finally i got it and it’s working now :pleased: :pleased:  
[AS]newsBox.html = true;  
newsBox.htmlText = this.myNews;[/AS]  
i removed mc\_textHolder too … :pleased: :pleased:

many thanx claudio 🍺

---

<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, 4:47am UTC](https://forum.kirupa.com/t/load-text-dynamicly/38753/9 "2003-12-30T04:47:04Z")

</div>

> i asked for this before:  
> my preloader appear in 70% precent… i want to tell you that i removed the components from my file and make load in separat mc … of course after loading

can you solve this too … :sigh:

new question… i want to control bgDataHolder.swf from the main swf… is it possible :h:

thanx :azn:

---

<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, 4:48am UTC](https://forum.kirupa.com/t/load-text-dynamicly/38753/10 "2003-12-30T04:48:20Z")

</div>

I was pretty sure it was a path problem, but since you didnt post the fla, it was hard to know for sure the correct path.  
Glad you got it working now. 🙂

---

<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, 4:51am UTC](https://forum.kirupa.com/t/load-text-dynamicly/38753/11 "2003-12-30T04:51:50Z")

</div>

there is lot of simple things stop a complex work… ☹  
i was wondering if i want to control this SWF and i saw \_root all the time but i didn’t imagine it’s the main problem.

---

<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, 4:53am UTC](https://forum.kirupa.com/t/load-text-dynamicly/38753/12 "2003-12-30T04:53:07Z")

</div>

To control the bgDataHolder.swf you need to target the movieclip where it was loaded into, in this case, the movieclip **mc\_dataHolderbg**.  
As for the preloader problem, how big is the swf that is being preloaded?

---

<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, 5:00am UTC](https://forum.kirupa.com/t/load-text-dynamicly/38753/13 "2003-12-30T05:00:01Z")

</div>

> the movieclip mc\_dataHolderbg

you mean this is will be the parent for bgDataHolder.swf .  
like the root for the main SWF… sorry i’m very confused now :h: .

movie is 60 kb… :puzzle:

---

<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, 5:07am UTC](https://forum.kirupa.com/t/load-text-dynamicly/38753/14 "2003-12-30T05:07:14Z")

</div>

Lets say you want to move the \_x coordinate of the bgDataHolder.swf to 100.  
You will need to target the movieclip that contains the bgDataHolder.swf:

```auto
mc_dataHolderbg._x = 100;

```

As for the preloader, im guessing it has almost nothing, maybe an interface for the text, and its most lots of code on the first frames. That may be causing that delay on your prelaoder.

---

<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, 5:12am UTC](https://forum.kirupa.com/t/load-text-dynamicly/38753/15 "2003-12-30T05:12:25Z")

</div>

thanx a lot claudio … 😉 .  
but there are a lot of questions… be ready.

thanx again.

---

<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, 5:14am UTC](https://forum.kirupa.com/t/load-text-dynamicly/38753/16 "2003-12-30T05:14:50Z")

</div>

Welcome 🙂  
And post as many questions you may have… if i cant answer, others will. 😉
