Contact Yart for a relaxed conversation
Your Name * Message *
Your Email *  
Your Phone   
Our Phone:        03 8685 8718 (within Australia)
61 3 8685 8718 (outside Australia)
Contact Yart

Melbourne Content Management and Flash developers

 

for designers, agencies and your website

Resources / Flash / FlashVars
Passing application root path in FlashVars
How to pass FlashVars from the HTML
<script language="JavaScript" type="text/javascript">
  .....
    AC_FL_RunContent(
      .....
      'salign', '',
      'FlashVars', 'rootPath=<%=AppPath%>' // <-- INSERT THIS LINE
    ); //end AC code
  .....
</script>
How to read the FlashVars from the Flash AS3
var XMLFILE = "/admin/temp/calendar.xml";

// See if rootPath parameter (FlashVars) is passed
var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;
var rootPath: String = paramObj["rootPath"];
if(rootPath != null)
{
	if(rootPath.substr(rootPath.length-1, 1)=='/')
		rootPath = rootPath.substr(0,rootPath.length-1); // Exclude slash
	XMLFILE = rootPath + XMLFILE;
}
The latest at Yart
Search: