Need help with SharedObject variable names

The syntax I normally use to read a string as an object reference, doesn’t seem to work with a SharedObject.

var name:String=[the object’s name as string]

works, but …[name]=someData

does not.

I want to access SharedObject names as variables. Does anyone know what would work?

Thanks for any help.