Calling Path in ActionScript


If you ever want to find the Base URL of your website, you can easily find it from URL your SWF is been called. To find the base URL you can use following 2 lines

var kLastSlash:Number = _root._url.lastIndexOf(‘/’);
var baseUrl:String = _root._url.substr(0, kLastSlash+1);

now use baseUrl variable where you need.

,