# Why can't I set a dynamic text field equal to a variable?

**URL:** <https://forum.kirupa.com/t/why-cant-i-set-a-dynamic-text-field-equal-to-a-variable/117356>\
**Category:** Uncategorized\
**Created:** [July 26, 2004, 9:18pm UTC](https://forum.kirupa.com/t/why-cant-i-set-a-dynamic-text-field-equal-to-a-variable/117356 "2004-07-26T21:18:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gragland](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/gragland/32/422_2.png) [@gragland](https://forum.kirupa.com/u/gragland)\
**Post date:** [July 26, 2004, 9:18pm UTC](https://forum.kirupa.com/t/why-cant-i-set-a-dynamic-text-field-equal-to-a-variable/117356/1 "2004-07-26T21:18:26Z")

</div>

I have a preloader. On one frame of the preloader is the code:

i++  
loadtext = i;  
emptyMC = “holder”+i  
allimages.\_visible = false;  
allimages.createEmptyMovieClip(“holder”+i, i);  
allimages[emptyMC].loadMovie(“weddingsintro”+i+".jpg");

Everything works fine, but the dynamic textfield with the var name loadtext is blank. If i set loadtext = i+“loaded” then it just displays “loaded”. I know the variable “i” has a value since the rest of the preloader works. Anyone know whats wrong?

---

<div class="post-metadata">

**Author:** ![McGiver](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@McGiver](https://forum.kirupa.com/u/McGiver)\
**Post date:** [July 26, 2004, 9:31pm UTC](https://forum.kirupa.com/t/why-cant-i-set-a-dynamic-text-field-equal-to-a-variable/117356/2 "2004-07-26T21:31:39Z")

</div>

the code seems correct to me (at least if its flashmx).

perhaps it might be useful to post the swf

---

<div class="post-metadata">

**Author:** ![gragland](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/gragland/32/422_2.png) [@gragland](https://forum.kirupa.com/u/gragland)\
**Post date:** [July 26, 2004, 11:53pm UTC](https://forum.kirupa.com/t/why-cant-i-set-a-dynamic-text-field-equal-to-a-variable/117356/3 "2004-07-26T23:53:03Z")

</div>

> [@McGiver](#):
>
> the code seems correct to me (at least if its flashmx).
> 
> perhaps it might be useful to post the swf

I should have mentioned. The preloader is a swf that is loaded into a blank mc in another movie. Does that matter?

---

<div class="post-metadata">

**Author:** ![bobdoe](https://avatars.discourse-cdn.com/v4/letter/b/51bf81/32.png) [@bobdoe](https://forum.kirupa.com/u/bobdoe)\
**Post date:** [July 27, 2004, 6:39am UTC](https://forum.kirupa.com/t/why-cant-i-set-a-dynamic-text-field-equal-to-a-variable/117356/4 "2004-07-27T06:39:09Z")

</div>

maybe the font color is the same color as the background. if not, try tracing the variable and see what you get. I always find the trace function useful for debugging.

---

<div class="post-metadata">

**Author:** ![gragland](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/gragland/32/422_2.png) [@gragland](https://forum.kirupa.com/u/gragland)\
**Post date:** [July 27, 2004, 9:00am UTC](https://forum.kirupa.com/t/why-cant-i-set-a-dynamic-text-field-equal-to-a-variable/117356/5 "2004-07-27T09:00:25Z")

</div>

> [@bobdoe](#):
>
> maybe the font color is the same color as the background. if not, try tracing the variable and see what you get. I always find the trace function useful for debugging.

Woops! The font I was using doesnt have numbers in its set.
