Sign in to follow this  
Steven Pena

Javascript Print via ExternalInterface

Recommended Posts

Is it possible to surface the printChart function of the Chart class to Javascript via the ExternalInterface? This would allow us to present an alternative interface to print from (link, button...) outside of the chart.

 

 

 

It's not very intuitive to ask the user to right-click and then select print, to print a chart. And as you have noted in several posts - you aren't responsible for browser printing (which isn't reliable across browsers).

 

 

 

You should only need to add this line to the Chart constructor:

 


/**

* expose printChart function to Javascript

*/

flash.external.ExternalInterface.addCallback("PrintChart", this, printChart);

 

Thanks,

 

:D

 

Steven

Edited by Guest

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