khoa Report post Posted August 27, 2008 I am evaluating the feasibility to print the fusion chart from the server. So I have create an Flash ActiveX Control and load an evaluate Fusion chart. Then I call the flash method GotoFrame and set the total frame of the flash, then I have a function that capture the current frame to an bitmap. That work fine with another flash. But with the fusion chart I get only the text "Fusion Charts Evaluation - An Infosoft Global Creation" but no chart data. Wich flash method must I call to play the chart to the end? Thank in advandce khoa Share this post Link to post Share on other sites
FusionCharts Support Report post Posted August 27, 2008 (edited) Hi khoa, Thanks for digging deep in FusionCharts. We are very interested to know how you are loading the chart at server side. Please let us know the os platform, the server side technology and server that you are using. If you are loading the chart in some place, why dont you try the chart's own native print() function? You can use callFunction method of Flash ActiveX. Would be happy to hear from you in details from you about the research. Edited August 27, 2008 by Guest Share this post Link to post Share on other sites
khoa Report post Posted August 27, 2008 Hello, To load a flash from server I use .NET to create a axShockwaveFlash Control und set the Movie-Property to the path of the swf file and set the chart data to FlashVars-Property. Then I call forward to the end of the movie and play. Afterall I want to make a Snapshort of the Flash to have a Bitmap. With the bitmap we can integrate in a PDF file for printing the whole other content on the server. But I don't know how to get the flash player to play to the end without embedded the flash to a Winform. our platform is Windows. How can I call the chart's own native function from the flash ActiveX control in .NET? Regards, khoa Share this post Link to post Share on other sites
FusionCharts Support Report post Posted August 28, 2008 Hi, I am afraid, I am abit confused about the processes involved. May I inquire, whether your steps are as follows: 1. Use WinForms to load the chart in a flash Player 2. Take a snapshot of the Flash Player (with chart or any Flash Movie) and save it as image to server and 3. Use the image to add in PDF etc. My Queries, 1. Is the chart or Flash Player visible in the WinForm? So far I learnt, you might not be able to not load a flash movie in flash player control without making it visible in WinForms. 2. At which point of time you are executing the code to save the image? Just after loading the chart? You might want to skip to the final frame or any frame, where you expect the final image of the chart, readily available. Comments: 1. Please note that in FusionCharts the things happen in steps through code and not frames. First it loads itself (the SWF binary), then the XML and other settings, then parses the XML and then draws the chart (usually with animation). So there is a time factor involved from the loading of the chart till the chart finally is drawn. Now this is crucial: Its not the final frame where you can skip to to get the chart image. You need to pass through the processes stated above, even if they take miliseconds to perform each fragment of task. 2. So you can wait for the chart to finish rendering and then call the image saving code. How to Do this? Of course you can set a flashvar "registerWithJS=1". This would invoke Flash Call event and pass a function name "FC_Rendered" (in <invoke> XML in response parameter of FlashCall event) . FC_Rendered is passed when the chart has finished rendering and ready for imagesavng, print etc. After this you can use your own code to save image. Share this post Link to post Share on other sites
khoa Report post Posted August 28, 2008 (edited) Hi, Thank you for you comment. I have added registerWithJS=1 in the Flashvar and get the "FC_Loaded" and "FC_Rendered" request from flashCall. But I until get a chart with no data. 1. Is the chart or Flash Player visible in the WinForm? ==> The chart and flash player is not visible because it should run in a Windows Service. At which point of time you are executing the code to save the image? ==> in firt version I save the image after call the FlashMethod for script "Forward" and now I save th image when I get the FC_Rendered request from FlashCall. But I think it to early because the flash has not beginning to play. Can I explicit call a method to render the chart?Regards, khoa Edited August 28, 2008 by Guest Share this post Link to post Share on other sites
FusionCharts Support Report post Posted August 28, 2008 Hi, Are you getting "No data to Display" message now? If so the the movie has started playing and the chart has started rendering. Please also add debugMode=1 to see if there is any issue with the XML passed. I think you are close. Share this post Link to post Share on other sites
khoa Report post Posted August 28, 2008 Hi, I get only the text "Fusion Charts Evaluation - An Infosoft Global Creation" but no chart data. The Xml-Data is ok. I get the chart when the window Form is showing. I think flash is not made to run on server. thank you very much for your support regards, khoa Share this post Link to post Share on other sites