Save data in a SO under info from text field

I am making a map editor and I want to be able to save map data under its own sub-directory in a Shared Object (SO).

I was thinking something like this:


mapSO = SharedObject.getLocal("mapEditor");
mapSO.data.mapName.text = "some info";

But that won’t work because Flash sees “mapName” & “text” as directories rather than what is in the actual mapName textfield. I was hoping that if someone typed “CoolMap” into the mapName text field, Flash would see it as:


mapSO.data.CoolMap = "some info";

But it doesn’t. Could someone help me with this, or offer a alternate solution.