# Dynamic text driving me nuts!

**URL:** <https://forum.kirupa.com/t/dynamic-text-driving-me-nuts/27726>\
**Category:** Uncategorized\
**Created:** [August 6, 2003, 12:14am UTC](https://forum.kirupa.com/t/dynamic-text-driving-me-nuts/27726 "2003-08-06T00:14:29Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![debut](https://avatars.discourse-cdn.com/v4/letter/d/fbc32d/32.png) [@debut](https://forum.kirupa.com/u/debut)\
**Post date:** [August 6, 2003, 12:14am UTC](https://forum.kirupa.com/t/dynamic-text-driving-me-nuts/27726/1 "2003-08-06T00:14:29Z")

</div>

I’ve been trying to sort this for ages now and can’t get anywhere with it. Problem is dynamic text not loading - scenario is I have movie b loading onto a stage area in movie a.

Movie b has a dynamic text field instance name updatesField and var: textField. The external text file I am trying to load within this field as movie b loads is called updates.txt and I have added the following actionscript to an actions layer within movie b:

loadVariablesNum(“dynamictext/updates.txt”, 0);

the text loads fine when i test movie b but as soon as i try to view it when movie b is loaded within movie a no text loads. i thought that this was maybe something to do with targets so changed the actionscript to:

loadVariables(“dynamictext/updates.txt”, “this”);

my text file starts textfield=

hope this makes sense n hope someone has a clue what i’m doing wrong lol

---

<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:** [August 6, 2003, 12:04pm UTC](https://forum.kirupa.com/t/dynamic-text-driving-me-nuts/27726/2 "2003-08-06T12:04:20Z")

</div>

On your movie b, place the following actions:[AS]var loadText = new LoadVars();  
loadText.load(“updates.txt”);  
//your txt file  
loadText.onLoad = function(success) {  
if (success) {  
varTextField = this.textfield;  
//varTextField is the name of the variable that the text field is associated with.  
//textfield is the variable inside the txt file.  
} else {  
varTextField = “Error loading data”;  
}  
};[/AS]  
Now create a TextField and on the Var field, use this:[AS]\_root.varTextField[/AS]

---

<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:** [August 6, 2003, 1:19pm UTC](https://forum.kirupa.com/t/dynamic-text-driving-me-nuts/27726/3 "2003-08-06T13:19:13Z")

</div>

Tried this - still getting the same problem. Text loads when I test movie B on it’s own but as soon as movie B is loaded within movie A nothing loads in the text field.

makes me think i’m going wrong somewhere with targets but can’t figure out where :\*(

---

<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:** [August 6, 2003, 2:32pm UTC](https://forum.kirupa.com/t/dynamic-text-driving-me-nuts/27726/4 "2003-08-06T14:32:47Z")

</div>

Possible to post a sample of your fla that invovles yoru scenario?

Regards,  
Viru.

---

<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:** [August 6, 2003, 2:51pm UTC](https://forum.kirupa.com/t/dynamic-text-driving-me-nuts/27726/5 "2003-08-06T14:51:09Z")

</div>

tried to post it but it telling me file is too big

---

<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:** [August 6, 2003, 2:56pm UTC](https://forum.kirupa.com/t/dynamic-text-driving-me-nuts/27726/6 "2003-08-06T14:56:10Z")

</div>

posted it to my server - should’ve thought of this before:

[zipfile](http://fxpaints.xpressivefx.com/temp/dynamictextproblem.zip)

---

<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:** [August 6, 2003, 3:04pm UTC](https://forum.kirupa.com/t/dynamic-text-driving-me-nuts/27726/7 "2003-08-06T15:04:32Z")

</div>

In you home.swf the variable name for you dynamic textfield is ‘\_root.varTextField’ change it to varTextField.

That worked.

Prehaps you got confused with claudio’s instructions.

Regards,  
Viru.

---

<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:** [August 6, 2003, 3:09pm UTC](https://forum.kirupa.com/t/dynamic-text-driving-me-nuts/27726/8 "2003-08-06T15:09:13Z")

</div>

yayyyyyy thanks u 2!!

working perfectly now - just gotta put scrollers back on n i be sorted :thumb:  
once again thanks - i really appreciate the help 🙂

---

<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:** [August 6, 2003, 3:16pm UTC](https://forum.kirupa.com/t/dynamic-text-driving-me-nuts/27726/9 "2003-08-06T15:16:31Z")

</div>

Im sure my instructions do work.  
:-\

---

<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:** [August 6, 2003, 3:16pm UTC](https://forum.kirupa.com/t/dynamic-text-driving-me-nuts/27726/10 "2003-08-06T15:16:40Z")

</div>

Your welcome.

V.

---

<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:** [August 6, 2003, 3:19pm UTC](https://forum.kirupa.com/t/dynamic-text-driving-me-nuts/27726/11 "2003-08-06T15:19:47Z")

</div>

they do Claudio - i had included ‘\_root.’ in front of ‘varTextField’ in the var field for the text field

just removed \_root. like kO2n advised and it works gr8 🙂

---

<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:** [August 6, 2003, 3:25pm UTC](https://forum.kirupa.com/t/dynamic-text-driving-me-nuts/27726/12 "2003-08-06T15:25:03Z")

</div>

Problem was when movie B was loaded into movie A the \_root.varTextField didnt apply to the varTextField variable in movie B.

What i think anyway.

Regs,  
V.

---

<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:** [August 6, 2003, 3:28pm UTC](https://forum.kirupa.com/t/dynamic-text-driving-me-nuts/27726/13 "2003-08-06T15:28:18Z")

</div>

sounds like it to me - this is my first flash site so i no expert but i think when movie b is loaded within movie a the \_root becomes the root of movie a. if that makes sense

---

<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:** [August 6, 2003, 3:29pm UTC](https://forum.kirupa.com/t/dynamic-text-driving-me-nuts/27726/14 "2003-08-06T15:29:04Z")

</div>

Perfect.

---

<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:** [August 6, 2003, 3:30pm UTC](https://forum.kirupa.com/t/dynamic-text-driving-me-nuts/27726/15 "2003-08-06T15:30:00Z")

</div>

i think finally some of this stuff is making sense to me lol

---

<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:** [August 8, 2003, 4:56am UTC](https://forum.kirupa.com/t/dynamic-text-driving-me-nuts/27726/16 "2003-08-08T04:56:18Z")

</div>

whello peepz

i have the same question to ask, dynamic text doesnt load anymore in the main movie, it does work on the other MC’s, but when i load it into the main movie the text just disapeared, only static text work, here an example:

[http://members.lycos.nl/vietguy/test\_site](http://members.lycos.nl/vietguy/test_site)

oh and i’ve used some actions from the  
[http://www.kirupa.com/developer/mx/preloader\_transition.htm](http://www.kirupa.com/developer/mx/preloader_transition.htm)  
tutorial (thnx claudio)

so the extern text doesnt load  
i can only see them when i change the text field into statictext and already put text in it, see the about section of  
[http://members.lycos.nl/vietguy/test\_site](http://members.lycos.nl/vietguy/test_site)

all the text and mc’s are extern files, exept the about section  
can anybody help me?
