public function SlideShow( ){
//If you are working locally on your computer, you will load manually load the xml file. Otherwise you will be receiving the xml file from SWFObject2
xmlURL = ( getDevelopmentMode() === "Production" ) ? getFlashVars().xml : "./xml/data.xml";
//Capture where the SWF is living on the live site
var currentLocationOfSWF:String = getContextPath();
}
private function getFlashVars():Object
{
return Object( LoaderInfo( this.loaderInfo ).parameters );
}
private function getDevelopmentMode():String
{
var dev:Boolean = new RegExp("file://").test( this.loaderInfo.loaderURL);
if( dev ) return "Development";
else return "Production";
}
private function getContextPath():String
{
var uri:String = getLoaderURL();
return uri.substring(0, uri.lastIndexOf("/")) + "/";
}
private function getLoaderURL():String
{
return this.loaderInfo.loaderURL;
}