Executing code from input box

Hey everyone

For the longest time ive been wondering whether it was possible to execute a set of commands typed inside an input box
The use would be for a user to type in some code, assign it to a button and execute it to change whats happening in the flash file - all this while the flash file is running.

i managed to find such a program:
http://chq.emehmedovic.com/chqengine.php?id=1&preview=true

unfortunately this program is really old, all coded in AS1. i was hoping to find out whether one of you might know of a program similar to this but coded in AS2 or AS3


What i need this program for

My flash program will import data from somewhere and display it.

The user can then write some code in an input box to carry out certain actions depending on what information was displayed

Say for example

the flash program randomly draws a square on the screen.
the user can then type in code let say
if (square above certain height) {
draw smiley face
}
else draw sad face


With the program shown in the link above, it is possible to carry out this task, but i want to know if anyone knows of something similar that is coded in AS2 pref AS3