# How to make code from a string

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 2, 2004, 6:00pm UTC](https://forum.kirupa.com/t/how-to-make-code-from-a-string/63064/2 "2004-09-02T18:00:05Z")

</div>

great question, Id love to know the answer to this one as well…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 2, 2004, 6:07pm UTC](https://forum.kirupa.com/t/how-to-make-code-from-a-string/63064/3 "2004-09-02T18:07:14Z")

</div>

y thanks, i try my best 😉

Prophet.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 5, 2004, 12:35am UTC](https://forum.kirupa.com/t/how-to-make-code-from-a-string/63064/4 "2004-09-05T00:35:45Z")

</div>

no1? ☹

Prophet.
