Sign in to follow this  
Vijaya_FC

Editing Action Script

Recommended Posts

Hi,

 

As per our requirement, on clicking a menu item (PDF,JPG,PNG) , the chart should be exported and the dialog box should open, to select the path(Client side export).

 

But in the current implementation it shows waiting(disabled button) on capturing and then shows the save button. Onclick of save button it will export . But we dont need this step.

After capturing the chart it should show the download dialog box..

 

As I am new to Action scripts, Please may I know the method called on clicking Export to PNG (client side).(FCExporter.swf). How can i modify the code to reflect my requirements.

 

How the Javascript and action script communicate. After the processing how it renders the output (or the method called) .

Please kindly help me in resolving the issues,

 

1.Tool used to open the swf( I tried with swf decompiler)

2. On changing how to check whether its working or not?

3. All the swfs used for fusion charts require input... so how to input the data to it

 

Thank you

Vijaya

Edited by Vijaya_FC

Share this post


Link to post
Share on other sites

But in the current implementation it shows waiting(disabled button) on capturing and then shows the save button. Onclick of save button it will export . But we dont need this step.

After capturing the chart it should show the download dialog box..

 

As per our requirement, on clicking a menu item (PDF,JPG,PNG) , the chart should be exported and the dialog box should open, to select the path(Client side export).

 

This is not possible as of now in client side exporting of FusionCharts.

 

As I am new to Action scripts, Please may I know the method called on clicking Export to PNG (client side).(FCExporter.swf). How can i modify the code to reflect my requirements.

 

How the Javascript and action script communicate. After the processing how it renders the output (or the method called) .

 


  1.  
  2. FusionCharts internally calls a function (which is exposed as exportChart() to JavaScript and can be called using JavaScript) to start capturing when export related Context menu items are clicked.
  3. Once the capture phase is complete the chart calls an ExternalInterface function and passes the captured data to the function as RLE string.
  4. The charts are built using AS2 and does not support ByteArray which is needed to built the raw data for jpg/png/pdf
  5. Hence, JS relays the data to another SWF (FCExporter.swf - which shows the wait/save button) built using AS3 which in-turn builds the exported formats
  6. Due to Adobe's security restriction, an swf can not automatically open up the save dialog without user mouse click interactivity on the swf, we have placed the save button

 

 

 

1.Tool used to open the swf( I tried with swf decompiler)

2. On changing how to check whether its working or not?

3. All the swfs used for fusion charts require input... so how to input the data to it

 

1. I am not sure you can decompile the chart from SWF decompiler and again recompile the chart. You would need the source code

2. We have in-house testing environment to test these

3. You need to provide data to swf in various ways. The easier way is to use FusionCharts.js wrapper and the JS API provided (http://www.fusioncharts.com/docs/?JavaScript/JS_Overview.html and http://www.fusioncharts.com/docs/?JavaScript/API/Overview.html). The native ways is to use FlashVars)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this