All Articles InDesign
Creating an Image Gallery .swf in InDesign for ePub
David Smith on Mon, April 2nd 4 comments
ePubs are all the rage and Adobe InDesign CS5.5 supports some intriguing, interactive features for this format. David Smith shows how to create an SWF image gallery for the ePub format.

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.

Related Videos
Comments (4)

You must be logged in to comment.

  • Jasmine
    Hi David How does this tie in with epub?
    • 10 years ago
    • By: Jasmine
  • 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.
    • 10 years ago
    • By: David Smith
  • Jasmine
    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? Jazzy
    • 10 years ago
    • By: Jasmine
  • 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.
    • 10 years ago
    • By: David Smith
What's New in iZotope RX 9
iZotope RX 9 100
Dream It. Do It.
Do you want to learn What's New in iZotope RX 9?
Yes, I want to learn!
No Thanks, I just want to read the article.
Course Advisor
Don't Know Where To Start?
Ask A Course Advisor
Ask Us!
Copy the link below and paste it into an email, forum, or Facebook to share this with your friends.
Make money when you share our links
Become an Ask.Video Affiliate!
The current affiliate rate is: 50%
Classes Start Next Week!
Live 8-week Online Certification Classes for: