Flash MX accessing dynamic text

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);

:!:

  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 :wink: