Forum Moderators: open

Message Too Old, No Replies

Dynamic Text Variable Variable

Need help with Syntax

         

capulet_x

4:50 am on Apr 5, 2007 (gmt 0)

10+ Year Member



Hello,
I have a movie which loads data from a text file into flash (-no problem there).
The twist to this is that one of the fields in my movie loads text into fields from a text file which looks similar to the example below:

myText_district=109
&myText_Ian=189
&myText_Dave=8
&myText_Ray=14

If I select a specific field in my flash movie and put for example" myText_Ian" as my Var in the properties panel I have no problem getting the "109" to echo at runtime.

But what I would like to do is specify the Var in the properties panel as something like:

"myText"+_root.managername

and still get the same result. You see, I want to define the variable "managername" at runtime in a field so that if I type for example "Dave" in the field the movie will substitute "Dave" in place of the variable "managername" all throughout my actionscript and thus retrieve only info applicable to "Dave".
The biggest problem for me is that I am stuck with the property panel because I can't apply actionscript directly to a dynamic textfield.

Is there a syntax that I can use in the Var field of the property panel to get the result I want; to get the variable equivalent to "myText"+_root.managername?

OR

Is there an example somone can show me on how to load variables from a text file into a SPECIFIC dynamic text field completely in action script?

Any help is greatly appreciated.

capulet_x

6:50 pm on Apr 22, 2007 (gmt 0)

10+ Year Member



This was solved by using eval.

Boy, this forum is pretty desolate...
Can anyone recommend a forum with a little more ..."life"?