-
1. Re: Need help in Exporting SWF file from InDesign using script
marius_9 Oct 3, 2013 6:53 AM (in response to Ramjivk)Hi,
I have exactly the same problem. Did you find a solution ?
Thanks
-
2. Re: Need help in Exporting SWF file from InDesign using script
Ramjivk Oct 3, 2013 7:30 AM (in response to marius_9)Hi,
where are you struck? can you send the script line?
-
3. Re: Need help in Exporting SWF file from InDesign using script
marius_9 Oct 3, 2013 7:34 AM (in response to Ramjivk)The script is quite simple, but I don't really know where to set the event ON_PAGE_LOAD to have a working swf file.
// Open file
var myDocument = app.activeDocument;
// Export SWF
app.swfExportPreferences.generateHTML=true;
app.swfExportPreferences.includeInteractivePageCurl=false;
app.swfExportPreferences.viewSWFAfterExporting=false;
// Try to add trigger on parent page
var myPage = myDocument.pages.firstItem();
var myTimingSettings = myPage.parent.timingSettings;
myTimingSettings.timingLists.add(DynamicTriggerEvents.ON_PAGE_LOAD);
// Export file
myDocument.exportFile(ExportFormat.SWF, "/path/to/file/sortie.swf");
On my page I have a simple textFrame with a custom path.
Thanks
-
4. Re: Need help in Exporting SWF file from InDesign using script
marius_9 Oct 4, 2013 12:23 AM (in response to marius_9)I found the answer. For those who are interested, you have to add a timingList and a timingGroup on the parent of the current page :
// Open file
var myDocument = app.activeDocument;
var myPage = myDocument.pages.firstItem();
var myItem = myPage.pageItems.firstItem();
// Export SWF
app.swfExportPreferences.generateHTML=true;
app.swfExportPreferences.includeInteractivePageCurl=false;
app.swfExportPreferences.viewSWFAfterExporting=false;
// Add timing list
var theTimingList = myPage.parent.timingSettings.timingLists.add(DynamicTriggerEvents.ON_PAGE_LOAD);
// Add timing group
var theTimingGroup = theTimingList.timingGroups.add(myItem);
// Export file
myDocument.exportFile(ExportFormat.SWF, "/path/to/file/document.swf");
-
5. Re: Need help in Exporting SWF file from InDesign using script
Ramjivk Oct 4, 2013 9:01 PM (in response to marius_9)Hi,
My issues is in exporting the SWF to PDF, not in the HTML. I used the below code to fix that issue. so while placing the SWF file i set the property of play on page load to true. so the PDF starts playing the SWF file after exporting it as interactive PDF.
var myDocument = app.activeDocument.pages.add();
myPageHeight = app.activeDocument.documentPreferences.pageHeight;
myPageWidth = app.activeDocument.documentPreferences.pageWidth;
myRectangle = myDocument.rectangles.add({geometricBounds:[0, 0, myPageHeight, myPageWidth]});
var myMovie = myRectangle.place(File("/path/test.swf"));
myMovie.embedInPDF = true;
myMovie.playOnPageTurn = true;
app.activeDocument.exportFile(ExportFormat.interactivePDF, File("/path/test.pdf"),false);
after that i export the PDF as interactive PDF.
hope it helps.

