//当前文件的完整路径
var fileUrl:String = this.loaderInfo.url;
//查找路径的最后一个"/"
var flag:int = fileUrl.lastIndexOf("/");
//截取文件名
var fileName:String = fileUrl.substr(flag + 1, fileUrl.length);
//输出
trace(fileName);
https://blog.****.net/iteye_18746/article/details/82239722?utm_source=blogxgwz7