jmarkus Report post Posted April 25, 2010 Hi all, I was browsing through the documentation and in this page you describe a scenario I need to do (load charts inside a flash movie) but you pass XML data only inside the movie's actionscript (using var strXML:String etc). I was wondering, is it possible to have a flash movie load the fusion chart inside it and take all XML data from an external .xml file? I see this is done in other scenarios where fusionchart swfs are embedded in HTML pages, but it's not mentioned here and I can't see how a path to the .xml file can be inserted in the actionscript instead of the actual xml data using var strXML:String. Thanks. Share this post Link to post Share on other sites
FusionCharts Support Report post Posted April 25, 2010 Hi, You can always load and pass valid XML to a chart em,bedded in a Flash movie. All you need to do is to use the XML.load() Please find the attached sample code : All you need to do is: //use XML object to load external XML// when done (onLoad event) render the chart using this XML) var xmlData:XML = new XML(); // define event handler for XML object // this calls a functrion when the external XML gets loaded in XML object. // renderChart() function will be called xmlData.onLoad = function(success) { renderChart(xmlData); }; // load external XML xmlData.load("external.xml"); function renderChart(xmlData){ var myFirstChart:Column3DChart = new Column3DChart(chartContainerMC, 1, 450, 325, 20, 15, false, "EN", "noScale"); myFirstChart.setXMLData(xmlData); myFirstChart.render(); } MyFirstChart_EnternalXML.zip Share this post Link to post Share on other sites
jmarkus Report post Posted April 26, 2010 this works great! Thanks! Share this post Link to post Share on other sites
Guest Rajroop Report post Posted April 26, 2010 Cheers! Happy FusionCharting. Share this post Link to post Share on other sites