[CS4, AS2] eval() problems!

Hey Guys,

I’m not exactly the best programmer, so go easy :stuck_out_tongue: I’m trying to hold the reference to a Movieclip (on the main timeline) on a variable inside another Movieclip. Base is the instance name of the Movieclip that holds the variable called Target. Target holds the reference to a Movieclip (Dot1, Dot2, etc.).

If I call trace(eval(Base.Target)._x); on the main timeline, it returns the X value fine. However, if I trace (eval(Target)._x) or trace (eval(“Target”)._x) inside the Base MC, it returns undefined. If I trace (eval(“Target”)) inside the Base MC, it returns fine. What am I doing wrong?

The line of code is
Closest = _root.GetDistance(_x, _y, eval(“Target”)._x, eval(“Target”)._y);

Target is a string variable that holds the instance name of the Movieclip.

Thanks!