# How to make code from a string

**URL:** <https://forum.kirupa.com/t/how-to-make-code-from-a-string/121418>\
**Category:** Uncategorized\
**Created:** [September 2, 2004, 5:51pm UTC](https://forum.kirupa.com/t/how-to-make-code-from-a-string/121418 "2004-09-02T17:51:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prophet](https://avatars.discourse-cdn.com/v4/letter/p/838e76/32.png) [@Prophet](https://forum.kirupa.com/u/Prophet)\
**Post date:** [September 2, 2004, 5:51pm UTC](https://forum.kirupa.com/t/how-to-make-code-from-a-string/121418/1 "2004-09-02T17:51:08Z")

</div>

i think u can do it via XML and the CustomFunctions methods in flash… but id rather do it all in flash if possible.

what i want to do is to treat a string as a line of code.

eg.

```auto
actV="trace('Red')"
 someButton.onPress=function(){
     actV.toCode()
 }

```

lol if only there was a _toCode()_ method!!

can it be done? if so, how? :puzzled::q::-/

cheers,

Prophet.
