var id : int = 1;
var item1 : String = "ho";
var item2 : String = "hum";
print(eval("item" + id));
This can of course be used for a lot more than just variables…
I’m guessing that this won’t work on the iPhone due to the ahead of time compiling, but I haven’t actually tried…