In Flash MX you would have to name the textfield instance within the mc. So the path to the textfield from the root would be something like _root.mc1.textfield1. Then all you have to is write _root.mc1.textfield1.variable=X. X being the name of the variable you want to assign to your textfield.
Ummmmmh! I could be wrong, but don't think you can dynamically set a textfield's variable that way. You could trace the variable's name using the "variable" property (trace(_root.mc1.textfield1.variable), but you can't set one like that!
why do you need to give the textfield a variable in the middle of a movie?
you could set the variable from the beginning without calling upon it til necessary
OR
you could have 'textfield1' and then swap it out with 'textfield2' (with included variable which you set in the properties panel) at the frame necessary.
The reason why is because i want to try to create a dynamic menu. When the user clicks a button, it will attach a movie called sub which checks the value (variable) that button passes. It will then duplicate the number of drop-down. With different mc, I need to have different variable for the text field. Then from a database, i create a file via Vignette with multiple variables for building names and add it to these duplicated mc.
Just want to see if it was possible.
If i can't change the variable dynamically, guess I have to do createTextField and do it via that route.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.