pdaniel Report post Posted July 28, 2008 I have created a class library assembly to be a wrapper to the Fusion files. I have added the .swf files as embedded resources in the project and I'm trying to reference these for use in the RenderChart funciton. See my code snippet below. url = Page.ClientScript.GetWebResourceUrl(GetType(ChartControl), "CFN.Web.UI.Controls.ChartControl.Pie2D.swf") chartDisplay.Text = FusionCharts.RenderChart(url, "", ConvertDataSetIntoXML, "CFNChart", ChartWidth.ToString, ChartHeight.ToString, False, False) The url converts to /Applications/APP360/WebResource.axd?d=YLFeAETZsBmqQEgBXxjSQFSxN5RnEZuFIJUEjNSceEbGk51IWHsbVz7EgPQDJcnFR4jON4zz6vCwI8vRg-0G5GLxH2CV3gfVD40OnqDPWG81&t=633528315360254502". Is this possible to accomplish? If not, how can I reference the .swf files so that they are located in only 1 directory and referenced by my class library project. Thanks! Patrick Share this post Link to post Share on other sites
Arindam Report post Posted July 28, 2008 yes this is Possible. are you Render swf file? Share this post Link to post Share on other sites
pdaniel Report post Posted July 28, 2008 Thanks for the reply. I'm not sure if I understand your question. When I execute the code in my snippet, no chart is rendered. There is no error, but there is no chart either. Share this post Link to post Share on other sites
Arindam Report post Posted July 28, 2008 I thing may be your Resource path not correct. Can you add this Resource Reference in your AssemblyInfo.cs file? Like this way? [assembly: WebResource("FusionChartsGen.resources.chartsFree.FCF_Area2D.swf", "application/x-shockwave-flash")] My project directory and root is FusionChartsGen. My FC swf location is resources/chartsFree so my full path is FusionChartsGen.resources.chartsFree.FCF_Area2D.swf . so I listed all with in AssemblyInfo.cs that way. [assembly: WebResource("FusionChartsGen.resources.chartsFree.FCF_Area2D.swf", "application/x-shockwave-flash")] Calling swf file ==================== // Sets SWF(FusionCharts) Path SWFPath = Page.ClientScript.GetWebResourceUrl(GetType(), "FusionChartsGen.resources.chartsFree.FCF_Area2D.swf"); Render Charts ================= chartDisplay.Text = FusionCharts.RenderChart(SWFPath, "", ConvertDataSetIntoXML, "CFNChart", ChartWidth.ToString, ChartHeight.ToString, False, False) Please follow it. Share this post Link to post Share on other sites
pdaniel Report post Posted July 28, 2008 Thanks for the code samples! I tried to replicate that in my environment. I have a resources directory in my project that contains all the .swf files. My project name is ChartControl. Hence I plugged in the below code. Code url = Page.ClientScript.GetWebResourceUrl(Me.[GetType](), "ChartControl.resources.Pie2D.swf") AssemblyInfo.vb Page This does not work. The namespace to my project is "CFN.Web.UI.Controls.ChartControl" so I'm not sure if that changes anything. Share this post Link to post Share on other sites
pdaniel Report post Posted July 28, 2008 That was it.. I adjusted to include the namespace and it pulls it in correctly. Thanks again! Share this post Link to post Share on other sites