Was wandering if there's a way to make an object type from a string. Like if I had a mush variable containing: "testObject1(),testObject2()"
function testObject1()
{
this.x = 20;
}
function testObject2()
{
this.x = 25;
}
function testing(list, element)
{
var listContents = world.getVariable(list);
var theList = listContents.split(",");
// right here. is there a way to do this?
var obj1 = new theList [element];
world.note(obj1.x);
}
function testObject1()
{
this.x = 20;
}
function testObject2()
{
this.x = 25;
}
function testing(list, element)
{
var listContents = world.getVariable(list);
var theList = listContents.split(",");
// right here. is there a way to do this?
var obj1 = new theList [element];
world.note(obj1.x);
}