InDesign CS4 adds the ability to export pages to Flash (SWF and XFL files).
The following is a 10 page InDesign CS4 document exported to SWF (Flash).
You can turn the pages by clicking the text “Next”. This text was converted to a button in InDesign. After the first page you will also see a “Previous” button.
More interesting, you can use drag and drop to turn the pages as if you’re turning the pages of of a book or a magazine. To turn the pages using drag and drop do the following:
- Hover the mouse cursor over the top right corner of the blue rectangle and drag it to the left. You should see the page curl.
- Click and drag to the left.
- Release the mouse button when the page appears close to having turned.
If you need to export SWF from a plug-in, take a look at the ExportDynamicDocument code snippet in the InDesign CS4 Products SDK. The above SWF was exported using that code snippet.
Note: We added a few enhancements (XFL export, and output file selection) in the 6.0.1 update.
The source file lives in the following location in the InDesign CS4 Products SDK.
The code snippet does the following in C++.
- Creates a 10 page document.
- The pages dimensions are small to create the desired SWF size.
- At 100% scale this is 72 pixels per inch
This last step demonstrates processing the kSWFExportCommandBoss and kXFLExportCommandBoss commands.
It’s more likely you would use scripting to build and export SWFs. I anticipate adding an equivalent scripting sample in the near future.