Looking up a document class name at runtime

I’m trying to find a way to look up a document class name. I haven’t found anything obvious and Google isn’t turning up anything, so I figured it was time to ask the experts. (I also did a quick search of these forums.) So far, my preferred solution seems to be to have an AppInfo class that contains a static String called “documentClassName”. I can’t help but think there must be a native way to look up the name at runtime. Does anyone have any clever tricks to share?

Sub-Question 1: I realize this gets a bit muddy when you load an external SWF. Is there a way to look up and/or differentiate between the document class names of the “top level” SWF and any loaded SWF?

Sub-Question 2: Would this type of reflection pose a security risk?

Thanks in advance, even if the answer is a simple “no”.