Most people think motion when they hear animations; but it’s very simple to create slideshows that play automatically when the page comes into view. Slideshows can be set so that as one objects fades out of view, the next object fades into view. You can also create buttons that give the user control over when a slideshow plays or stops.
Creating a cross-fade slideshow
A cross-fade slideshow is one where as the first object fades off-screen the next one fades on. You can accomplish this using the animation presets for Fade In. For instance, let’s say you’re creating a children’s book where you want the letters of the alphabet to appear one by one.
Objects can be made to fade into each other using the Fade In animation preset.
- Select all the objects for the slideshow; in this example, separate letters of the alphabet. Stack them on top of each other by using the Align panel to center them horizontally and vertically. The letters should be graphics, or if text, in a frame with a white fill so that each object hides the one below it. Choose the Fade In preset from the Animation panel. Leave the Event setting to On Page Load.
- Set the Duration to 1 second and set the Speed menu to Ease In and Out. That gives a more natural appearance to the fades.
- In the Timing Panel select all the objects and apply a Delay of 2-4 seconds. This gives more time for each letter to be seen. Make sure the order of the objects in the Timing panel is the order that you want them to play. If not, drag the objects into the correct position.
- Use the EPUB Interactive Preview panel (see page 98) to preview the slideshow.
If you want the last letter to fade out of view at the end, place a rectangle with a white fill after the last object in the series.
The Animation and Timing panels set to create a slideshow. The order that the objects are listed in the Timing panel is the order that they will play.
Using a button to prompt a slideshow
The slideshow in the above exercise is set to automatically play on page load. Instead, you might want to click or tap a button to play the animation.
- Repeat steps 1 through 5 in the previous exercise. You’ll notice that the Event setting in the Animation panel is set to On Page Load. You need to change that into a button event.
- Create the object that you want to be the button. Then, with all the objects selected, in this example, letters of the alphabet, click the Create Button Trigger icon in the Animation panel. Then click the object that you want to be the button. All the slideshow objects will be listed in the Buttons and Forms panel set to play each animation. The animations don’t play simultaneously. They play in sequence in the order that they are listed in the Actions area.
- Look at the Animation panel. You’ll see that the animated objects are set to play On Page Load as well as On Release. Choose On Page Load from the Events panel to deselect it. This leaves On Release as the only prompt for the animation.
- Click the button in the EPUB Interactive Preview panel (see page 98), to preview the slideshow.
Use the Create Button Trigger icon to add all the objects in the animation to play when a button is clicked.