X Course Advisor FREE Course Advisor
Watch Tutorials
Creating an Image Gallery .swf in InDesign for ePub

The meteoric rise in the popularity of ePub has seen Adobe respond with some great new applications as well as great new features for existing applications. Right up there near the top of this cohort of cool are some of the interactive features in InDesign. None more so that the creation of interactive galleries in .swf files.

Step 1 - Prepare some Pictures

Open 4 images in Photoshop and select the crop tool. 

crop tool options

Crop tool options.

Set the crop tool size to 12cm wide and 8cm high, and the resolution to 300ppi. This will ensure all the images are the same size, and that they already fit the InDesign page. 

Crop each image until you're happy with the composition and content of each one and press Return to accept the crop edit. 

Step 2 - Make the Images RGB

Go to the Image menu and choose Mode > RGB so each images color space is optimized for electronic display rather than print. 

RGB mode

RGB mode.

Finally save each image in turn as a jpg and name them "Gallery Pic 1", "Gallery Pic 2" etc. Then close Photoshop.

Step 3 - Place the images

In your InDesign document add a new page, or select an empty one. Press Command-D to start placing pictures. 

Place options

Place options.

Select all 4 Gallery Pic images you just created and click open. All 4 images are loaded into your cursor in InDesign, waiting to be placed. 

Click 4 times on different parts of the page so that each image appears placed on the page. Remember they were sized already in Photoshop so there's no need to resize them here. 

Step 4 - Align the images

Select all 4 Graphic Frames on the page and use the Align panel to align them both Horizontally and Vertically so they all share the same X and Y coordinates. 

The aligned images.

The aligned images.

Step 5 - Create an Object

Keep the 4 Frames selected and change the window layout to Interactive. This will reveal the Object States panel. 

Object panel

Object panel.

Open the Object States panel and click on the Convert selection to multi-state object button. This makes the 4 images an Multi-state Group, which is what we need to create our gallery. Name the group "Gallery 1" in the Object Name field and press Return.

Step 6 - Add some buttons

Now find the Sample Buttons panel and choose a style of button you want to use. Drag one pointing right to the right side of your Gallery 1 object. Resize it if you need to. 

Buttons placed

The Buttons placed.

Do the same on the left side using a left pointing arrow. These will become our next and previous buttons for the gallery. Remember to be neat and align them. 

TIp: Anything can be used as a button, not just the library contents.

Step 7 - Make the Buttons work

Select the next button and open the panel called Buttons. Here we can add behaviors to the button and also name them. Name this button Next


Actions at work.

The Action Go To URL is added already to a button on an On Release Event, which means that when a button is clicked and released the URL would open. To remove this Action click the minus button next to Actions. Then click the Plus button to add a new Action by choosing from the list. Change the action to Go To Next State

Make sure that the action is pointing towards Gallery 1 in the Object drop-down menu.

This action means that when the next button is clicked the Gallery 1 object will change to the next state (picture) in the Multi-state Group.

Step 8 - Add a Previous Button

Repeat step 7 for the previous button, only choose the action on release as Go to Previous State, and name that button Previous.

Step 9 - Export swf

Save the Document by choosing File > Export to open the documents export options. From the Format menu pop-up choose Flash Player (SWF) as the export preset and choose Save. 

Flash Export Menu

Flash Export Menu.

Save the SWF file out and then open it using Flash Player or a web browser. 

Click the Next and Previous buttons to view the gallery. 

Final Gallery

Final Gallery.

Now that should be enough to keep you busy adding some oomph to your interactive documents. If you really want to add some extra sparkle remember to include interactive page curls in your swf export options for that truly immersive user experience.

David Smith

David Smith | Articles by this author

David Smith is Scotland's most qualified Apple and Adobe certified trainer. Having completed his education at Edinburgh College of Art's BAFTA winning Film School, David moved straight into TV production, first as a Vision Mixer then quickly becoming, at the age of just 24, a director of live TV studio productions. In 2001 he moved into Higher Education where he became a lecturer in TV Production, specializing in post-production and live studio production. During this time, and working with the support of the BBC, Channel 4 and independent production companies, David was instrumental in the design, development and implementation of industry-approved vocational courses across Scotland's Colleges. In 2006, after working closely with Apple Computers to create a unique multimedia studio for education at the Music and Media Centre in Perth, David became Scotland's first Apple-Certified Trainer for Pro Apps. This led on to David forming the first Apple Authorized Training Centre for Education, north of Manchester. In 2008 David made the move to full time training and joined the ranks at Academy Class, Ltd. where he continues to train industry professionals as a certified trainer across the Adobe Creative Suite and Apple Pro Apps range.


Apr 07, 2012
Hi David
How does this tie in with epub?
Apr 08, 2012
David Smith
It's not specifically a technique for ePub. Interactive .swf is a more likely use, perhaps I should re-name it. However if you do intend to add a swf gallery to an ePub file (granted ignoring iOS users) this is how you'd create the swf.
Apr 08, 2012
Hi David

Thanks for getting back to me so fast.

How do you add a swf file to an ePub file?

Could you recommend an ebook reader/tablet device that supports swf animation?

Apr 10, 2012
David Smith
Bookworm supports Flash, you need to use some ActionScript to embed the .swf. You also need a fallback (usually a .jpg) for all the readers that don't support Flash.
You must be logged in to post a comment.
Create an Account  Login Now

What is macProVideo.com?

macProVideo.com is an online education community featuring Tutorial-Videos & Training for popular Audio & Video Applications including Adobe CS, Logic Studio, Final Cut Studio, and more.
© 2017 macProVideo.com
a division of NonLinear Educating Inc.