Updated Eval Technote

Created Tue, 14 May 2002 12:15:01 +0000 Modified Tue, 14 May 2002 12:15:01 +0000
76 Words

The tech note describing using eval on the left side of an operator has been updated to take note of an issue that has arisen.

eval("TextField" + "One") = "string1″
trace("TextFieldOne")

Will return “undefined” in Test Movie and the eval() will fail in Macromedia Flash Player 6.

To correct the problem enclose the string concatenation in an extra set of parentheses:

eval(("TextField" + "One")) = "string1″;

You can find more info on eval in this post.