Just useful to note: if you load one SWF into another, the loaded (internal) SWF will return an erroneous result if you use loaderInfo.url to try to get the file name. For example, something like:
Path/To/Outer.swf/[[DYNAMIC]]/1
Instead:
Path/To/Inner.swf
Caution!
So, here is the code that I use to get the current SWF name:
function SWFName(symbol:DisplayObject):String { var swfName:String; swfName = symbol.loaderInfo.url; swfName = swfName.slice(swfName.lastIndexOf("/") + 1);
ivanreese
source share