# Good vs. EVAL

**URL:** <https://forum.kirupa.com/t/good-vs-eval/169933>\
**Category:** Uncategorized\
**Created:** [November 21, 2005, 9:52am UTC](https://forum.kirupa.com/t/good-vs-eval/169933 "2005-11-21T09:52:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jasonoda](https://avatars.discourse-cdn.com/v4/letter/j/db5fbb/32.png) [@jasonoda](https://forum.kirupa.com/u/jasonoda)\
**Post date:** [November 21, 2005, 9:52am UTC](https://forum.kirupa.com/t/good-vs-eval/169933/1 "2005-11-21T09:52:54Z")

</div>

sorry for the conry title

i am old school actionscripter who really liked using my eval(a+b)=10 style of scripting. apparently in flash 6 they did away with letting you do this for some reason. i learned the new way to do things which is like this:

[color=Red]sc=1  
this["\_root.e"+sc]=7  
trace(this["\_root.e"+sc])[/color]

but what annoys me is if i say this

[color=Red]trace(\_root.e1)[/color]

i still get undefined and not “7”  
is there a way that i can get the value of “[color=Red]e1[/color]” without having to write: [color=Red]trace(this["\_root.e"+sc])

[color=Black]another example:  
if i say:[/color]

[/color][color=Red]sc=1  
this["\_root.e"+sc]=7  
addit+=\_root.e1  
trace(addit)

[color=Black][color=Red]addit[/color] just stays at 0

instead i have to say[/color] addit+=[/color][color=Red]this["\_root.e"+sc]

[color=Black]i think this is kind of dumb. one used to be able to do this back in the flash 5 days with eval. is there any other way to do this?

jason oda  
[starvingeyes.com](http://starvingeyes.com)  
[/color][/color]
