Hey Nathan,
please keep in mind that the code you've posted will only work on objects that have been marked as singletons. Non-singleton objects will yield a new instance everytime you call _applicationContext.getObject().
If you want to keep track of those you will have to create your own mechanism that keeps track of what object belongs to which object id.
I guess something like this could work:
Code:
var objectName:String = 'SomeObjectId';
var objectIdRegistry:Dictionary = new Dictionary(true);
var object:Object = _applicationContext.getObject(objectName);
objectIdRegistry[object] = objectName;
than somewhere else in your code if you want to know the object id that the object originated from:
Code:
var objectName:String = objectIdRegistry[object] as String;
That way you can keep track of both singletons and prototyped objects.
Hope that helps a little,
cheers,
Roland