Skip to main content
Participant
August 17, 2007
Question

eval() and _root question

  • August 17, 2007
  • 1 reply
  • 274 views
Using FlashCS3,
This works:
_root.mcScreen1._visible=0;

So why doesn't this work:
i=1;
_root.eval("mcScreen"+i)._visible=0;

Is this a valid wayto use the eval() function? Thanks for your help.
This topic has been closed for replies.

1 reply

action74Author
Participant
August 17, 2007
Nevermind I figured it out:

This works:
eval("_root.mcScreen"+i)._visible=0;
kglad
Community Expert
Community Expert
August 17, 2007
better would be to use the array operator: