Posts in Category "C++"

HTML Extensibility in InDesign CC

The InDesign update you received in August 2013 (InDesign 9.1) included the enabling of HTML5 extensions.

As you may already know, starting in the middle of 2014 Adobe will begin removing Flash-based extension support in Creative Cloud products, starting with Photoshop CC.

If you have any hybrid or regular Flash extensions for InDesign you need to begin migrating them to HTML5 as soon as possible.

Continue reading…

Using EVE for UI layout

The Adobe Express View Engine (EVE) is the recommended method of laying out UI widgets in InDesign dialogs. The main benefit of using EVE is that widget geometry is calculated for you, so that when you add or remove widgets to a dialog all of the other widgets are shifted automatically without you having to recalculate sizes etc.

Continue reading…

Flash UIs with InDesign CS4

InDesign user-interface development can be expensive. It takes a lot of effort to implement a dialog or panel in ODFRC. Things should improve in future versions, with the possibility of using Flash-based user-interface tools like Flex and FlexBuilder. While this represents the future direction of InDesign user-interface development, there is a present reality in InDesign CS4. With an understanding of the current situation, you can implement Flash-based user-interfaces for InDesign CS4.

Continue reading…

InDesign Flash Export with C++

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: 

  1. 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.
  2. Click and drag to the left.
  3. 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.

  SDK/source/sdksamples/codesnippets/SnpExportDynamicDocument.cpp

The code snippet does the following in C++.

  1. 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
  2. Creates two text frames on the master pages and converts them both to buttons.
  3. Adds appropriate events (back and next) to these two buttons.
  4. Exports to SWF or XFL.

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.