Hardcore Scripting

I’m working on a project that will require call function using variables example:


function test1(){
 trace("allo")
}
var test2:String = "test1()"
trace(test2) // now i getting ->test1()
 

in fact i want to call the function test1() using the variable test2

i also used the following line


trace(_root[test2]) // i get a undefined

can anyone give me a hand on this one!!!
woyrz
http://www.mediaflexdesign.com