# Dynamic text assignment problems in MX04 \[renamed\]

**URL:** <https://forum.kirupa.com/t/dynamic-text-assignment-problems-in-mx04-renamed/111328>\
**Category:** Uncategorized\
**Created:** [May 25, 2004, 11:29pm UTC](https://forum.kirupa.com/t/dynamic-text-assignment-problems-in-mx04-renamed/111328 "2004-05-25T23:29:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![saad](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@saad](https://forum.kirupa.com/u/saad)\
**Post date:** [May 25, 2004, 11:29pm UTC](https://forum.kirupa.com/t/dynamic-text-assignment-problems-in-mx04-renamed/111328/1 "2004-05-25T23:29:50Z")

</div>

onClipEvent (load) {  
\_root.acc = 100;  
}

acc is a dynamic text, but when I run the movie it gives an undefined error. What do i do?

---

<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:** [May 26, 2004, 3:47am UTC](https://forum.kirupa.com/t/dynamic-text-assignment-problems-in-mx04-renamed/111328/2 "2004-05-26T03:47:58Z")

</div>

what are you trying to do? make your dynamic text box display “100”?  
if so, this is what your code should look like:

```auto

onClipEvent (load) {
_root.acc.text = "100";
}

```

---

<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:** [May 27, 2004, 1:22am UTC](https://forum.kirupa.com/t/dynamic-text-assignment-problems-in-mx04-renamed/111328/3 "2004-05-27T01:22:38Z")

</div>

> [@Yeldarb](#):
>
> what are you trying to do? make your dynamic text box display “100”?  
> if so, this is what your code should look like:
> 
> ```auto
> 
> onClipEvent (load) {
> _root.acc.text = "100";
> }
> 
> ```

Im trying to set a variable which is going to be 100 but its not working when I type in

onClipEvent (load) {  
\_root.acc = 100;  
}

the above doesn’t work either. This is in Mx 2004.

---

<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:** [May 27, 2004, 1:53am UTC](https://forum.kirupa.com/t/dynamic-text-assignment-problems-in-mx04-renamed/111328/4 "2004-05-27T01:53:21Z")

</div>

Where are you placing that code? It should be on a movieclip or if you want it on a frame use simply \_root.acc = 100;  
It would be better if you provide the error message.

---

<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:** [May 27, 2004, 4:40am UTC](https://forum.kirupa.com/t/dynamic-text-assignment-problems-in-mx04-renamed/111328/5 "2004-05-27T04:40:05Z")

</div>

just place it on a frame and use \_root.acc= 100.  
like claudio said, if you want it like that it should be on a clip.

sam
