Klinenator Report post Posted August 6, 2009 //Register the event listeners for charts chart1.addEventListener("linkClicked", objL); chart2.addEventListener("linkClicked", objL); This code is in the documentation. When i try to add an event listener in mine i get this error "There is no method with the name 'addEventListener'." Share this post Link to post Share on other sites
Guest Rajroop Report post Posted August 7, 2009 Hello, Could you provide your code so that we may have a look? Looking forward to your reply. Share this post Link to post Share on other sites
Klinenator Report post Posted August 10, 2009 (edited) #include "com/fusioncharts/includes/LoadingFunctions.as" #include "com/fusioncharts/includes/AppMessages.as" import com.fusioncharts.core.charts.Column3DChart; import com.fusioncharts.core.charts.Pie3DChart; var objL:Object = new Object(); objL.linkClicked = function(targetObj:Object){ trace("Data belonging to " + targetObj.link + " was clicked"); } var myXML = new XML(); var myXML2 = new XML(); var myXML3 = new XML(); myXML.ignoreWhite=true; myXML2.ignoreWhite=true; myXML3.ignoreWhite=true; myXML.load("http://rrsaccess/FlashXML.aspx?MonthlyCount=8"); myXML2.load("http://rrsaccess/FlashXML.aspx?Drage=1"); myXML3.load("http://rrsaccess/FlashXML.aspx?Reconciliation=1"); myXML.onLoad = function(loaded){ if (loaded){ myXML =this; loadChart(); } } myXML2.onLoad = function(loaded){ if (loaded){ myXML2 = this; loadChart2(); } } myXML3.onLoad = function(loaded){ if (loaded){ myXML3 = this; loadChart3(); } } function loadChart(){ var chartContainerMC1:MovieClip = this.createEmptyMovieClip("ChartHolder1",1); var Chart1:Column3DChart = new Column3DChart(chartContainerMC1, 1, 450, 325, 20, 15, false, "EN", "noScale"); Chart1.setXMLData(myXML); Chart1.render(); Chart1.addEventListener("linkClicked", objL); stop(); } function loadChart2(){ var chartContainerMC2:MovieClip = this.createEmptyMovieClip("ChartHolder2",2); var Chart2:Pie3DChart = new Pie3DChart(chartContainerMC2, 1, 450, 325, 500, 15, false, "EN", "noScale"); Chart2.setXMLData(myXML2); Chart2.render(); stop(); } function loadChart3(){ var chartContainerMC3:MovieClip = this.createEmptyMovieClip("ChartHolder3",3); var Chart3:Column3DChart = new Column3DChart(chartContainerMC3, 1, 450, 325, 20, 400, false, "EN", "noScale"); Chart3.setXMLData(myXML3); Chart3.render(); stop(); } Edited August 10, 2009 by Guest Share this post Link to post Share on other sites
mediumwave Report post Posted December 11, 2009 I have the same issue, my code: /** * Loads the wrapped flash. */ function loadWrappedFlash() { var clip:MovieClip = this.createEmptyMovieClip("loader", this.getNextHighestDepth()); clip.opaqueBackground = 0xFFFFFF; var url = _root["embedswf"]; var listener = new Object(); listener.onLoadError = function(mc, errorCode, httpStatus) { trace(errorCode); }; var mcLoader:MovieClipLoader = new MovieClipLoader(); mcLoader.addListener(listener); mcLoader.loadClip(url, clip); } /** * This function is called in JavaScript, registers the listener of 'LinkClicked' * for FusionCharts. */ function registerLinkClickedListener( ) { if ( com.fusioncharts || com.fusionmaps ) { var fusionObj = this.loader.Chart; if ( !fusionObj ) { fusionObj = this.loader.Map; } if ( fusionObj ) { var objL = new Object( ); objL.linkClicked = function( targetObj ) { if ( targetObj && targetObj.link && flash.external.ExternalInterface.available ) { flash.external.ExternalInterface.call ( "function( flashID )" + "{" + "actuate.widget.custom.flash.FlashWrapperManager.onClick( flashID, "" + targetObj.link + "" );" + "}", _root[ "chartID" ] ); } }; fusionObj.addEventListener( "linkClicked", objL ); } } } Share this post Link to post Share on other sites