# Flash MX accessing dynamic text

**URL:** https://forum.kirupa.com/t/flash-mx-accessing-dynamic-text/21192
**Category:** flash
**Created:** [May 18, 2003, 5:59pm UTC](https://forum.kirupa.com/t/flash-mx-accessing-dynamic-text/21192 "2003-05-18T17:59:34Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![charbar98](https://avatars.discourse-cdn.com/v4/letter/c/ad7895/32.png) [@charbar98](https://forum.kirupa.com/u/charbar98)
#### Post date: [May 18, 2003, 5:59pm UTC](https://forum.kirupa.com/t/flash-mx-accessing-dynamic-text/21192/1 "2003-05-18T17:59:34Z")

</div>

I am trying to make a random number appear in a dynamic text box inside a movie clip and be able to change it from the main timeline. The code that I have looks something like this…

//here the instance name of the text box is inst and “write in textbox” is what I want to initially appear. I am trying to assign what is written in the textbox to variable y and z in the main timeline. Is that possible?  
inst = “write in textbox”;

t2 = “testing variable dynamic text”  
trace(t2);  
y = movie1.name;  
z = movie2.name;  
trace(z);  
trace(y);

:!:

---

<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 18, 2003, 9:43pm UTC](https://forum.kirupa.com/t/flash-mx-accessing-dynamic-text/21192/2 "2003-05-18T21:43:05Z")

</div>

1. It is \_name not just name.

2. If y and z are textboxes, then if their instance names are y and z then you use y.text and z.text, but if their var names are y and z then y and z should work fine.

3. I sure hope this is just part of the script because it in no way generates a random number 😉
