# AS3 + Eval-like function?

**URL:** <https://forum.kirupa.com/t/as3-eval-like-function/327441>\
**Category:** flash\
**Created:** [March 1, 2012, 3:06am UTC](https://forum.kirupa.com/t/as3-eval-like-function/327441 "2012-03-01T03:06:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![selacius](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@selacius](https://forum.kirupa.com/u/selacius)\
**Post date:** [March 1, 2012, 3:06am UTC](https://forum.kirupa.com/t/as3-eval-like-function/327441/1 "2012-03-01T03:06:45Z")

</div>

So I have a string of text, but within this text I want to input a variable at a specific portion of the text. Now this string of text is taken from an XML file. So the XML file would look like this for example:

```auto

<name>Sweep</name>
	<type>ATK</type>
	<target>AoE-EN</target>
	<caste>Warrior</caste>
        <desc>"This is a text"+temp.alias+"hey"</desc>

```

The \<desc\> is an example of a way I tried to make it work. What I want to happen is when I display the desc in my flash file, it inputs the alias (which in the xml is the name) of the item. In PHP this could be doing using EVAL() but I notice the support for that type of function is removed in AS3. Any help?
