I uploaded a swf file that loaded assets from a relative directory, but the Starling asset manager wasn’t working correctly since it needed the full path and I was uploading to the web. When I used the relative path, it only knew what it was up to the main domain level, but didn’t recognize the subfolders that the swf was located in. The following few lines figure out the folder that my swf file was living in, so then I could prepend that to all external file paths that I am loading in. Hope it’s helpful to someone!
var a:Array = this.loaderInfo.url.split("/"); var swfName:String = a[a.length-1]; var localURLPath = this.loaderInfo.url.substring(0, this.loaderInfo.url.indexOf(swfName));