private function getFilename(myURL:String):String
{
var lastSlash:Number=myURL.lastIndexOf("/")+1; //get the beginning of filename after last "/"
var lastDot:Number=myURL.lastIndexOf(".");//get the last . location, after our "/"
if (lastDot < lastSlash) lastDot = myURL.length; //in case there's no "."
return (myURL.slice(lastSlash,lastDot));//cut out the part starting at after "/" and ending at "."
}
|