Hi all,
First off apologies for posting this as I am of the belief this has being asked before, but after 3 days of attempts and searches I cannot find any answers, hence I am making this post.
In summary, I am attempting to embed a swf into a pdf. The swf is a chart that is created using data retrieved from a database. The swf requires to have some flashVars passed to it upon creation. In addition, during the lifecycle of the swf uses the values of the passed in flashVars to make calls to a server to retrieve the required data and update the displayed charts.
The areas I am struggling are, first setting the flashVars. Or better put finding an example of how the flashVars can be set. Currently I am using Adobe Acrobat 9 Pro extended. When I drag the swf into the pdf I am presented with a dialog that has a 'flash' tab. I select this and enter what I would normally pass to the swf (note at the moment I'm hardcoding the ID and url of the flashVars as my goal is not a proof of concept that the swf can be embedded and function). I then save and open the pdf expecting the swf to execute and display the charts but nothing happens. I presume either, it can't make the server calls and is failing or I am not passing the flashVars correctliy (i.e. using the wrong syntax). Can anyone advise on if the syntax is correct or not? (I couldn't find any examples online).
caseID=10001&url=case_home
Plus, I can not find out if it is even possible for the embedded swf in the pdf can make server calls? Can someone answer this, just to let myself know if it is possible or not.
Any help is much appreciated.
Paul.
I've made some progress, so thought I would provide an update in the hope that some may be able to help with the latest issue I’ve ran into.
In summary, through the use of placing many alert.show() statements into my swf I've managed to confirm that I am correctly passing the flashVars to the swf through the pdf.
I've also manage to identify that the swf is not correctly connecting to the server and retrieving the data required by the swf to render the chart. That is, the tag is failing, as when the below is called, the ‘processServerFault(event)’ is executed (I placed an alert.show() in here to confirm). It is not entering the processOverviewAndPrioritiesData(). Plus, I also placed breakpoints in the relevant server code and these are never hit.In an attempt to get this working I hardcoded the url set in the HTTPService to be:
overviewServerData.url =http://localhost:9080/Curam/servlet/FileDownload?pageID=GraphOverviewDetails&caseID=10001. As mentioned above though this still did not work.Hence, is anyone aware of (or have a suggestion) a step I am missing here? Is there something I need to know to get the swf in the pdf to call out to a server?
Should I be passing the url through ExternalInterface to some JavaScript function in the PDF that will make a call to the server? I’ll be honest, the last part is very much guess work as I’ve no idea where to start to do that (on the embedding the javascript to the pdf and making a server call), but I would welcome all other suggestions.
Thanks for any help.