Dynamically creating variables (variable names)?

Does anyone know how to do this in Flash? I’d like to dynamically create vars (var names) in a loop, like this:

var1 = 1;
var2 = 2;
var3 = 3;

The problem is that this doesn’t pass (because left side of the assigment has to be a property):

eval("_root."+myKey) = myValue;

This code doesn’t work well, also:

_root[myKey] = myValue;

I succedded in putting name/values pairs into an Array:

element[myVar] = myValue;

But this is not good for a given purpose, I’d rather have variables in _root.