Getting a Flash movie name

(Okay, the response was so quick and helpful with my last question I thought I’d post another)

Is there an efficient way to get the name of the Flash file you are in via actionscript? i.e. from within ‘My_Flash.swf’ I want to get THAT name. (Something like ‘myName = the movieName’ in Director)

All I could find so far was the _url property which holds the entire path string and also requires the extra code to check for and clean up any odd character replacements. (i.e. My_Flash_Fancy_Thing.swf becomes My%5FFlash%5FFancy%5FThing.swf in a url)

var movieName = unescape(this._url).split("/").reverse()[0];

…If you find something easier than that, let me know. :stuck_out_tongue:

RE: var movieName = unescape(this._url).split("/").reverse()[0];

Thank you kobe, that does the trick.
(I hadn’t discovered the ‘escape-unescape’ functions yet. )

Sorry, make that ‘Thank you <b>kode</b>!’