Sequencing Actions for a Slide Show

Here’s an example of using custom messages and a delay action to build a slide show. When the page loads, a slide flies onto the page, stays there for the duration of time specified by a delay, flies off, and is followed by another slide.

Before you begin, gather the pictures you want to show in each slide and set the HTML output to Fixed Page Layout.

  1. In Page view, create a Layout Region, and in it, place pictures and text for your first slide.

By creating each slide in a Layout Region, you can include multiple objects per slide.

  1. Select the Layout Region and clear the Object initially visible in browser option on the Actions tab of the Properties palette.

You clear this object so the slide doesn’t appear until an action triggers it to fly onto the page.

  1. Create three custom messages named ShowPicture, PictureIsIn, and DelayIsDone, as described in Tailoring Actions with Custom Messages.
     


 

Using custom messages rather than a generic End Motion trigger to trigger each slide’s entrance and exit lets you control exactly which motion triggers what.

  1. Add five actions to the Layout Region, as described in“Adding Actions to Objects and Pages” on page 417. For each action, fill out the Set Action dialog like this:

Action 1. Enter Page, Page Loaded in the When field; the Layout Region in the Target field; and Custom, ShowPicture in the Message field.

Action 2. Enter Custom, ShowPicture in the When field; the Layout Region in the Target field; and Motion, Fly in the Message field. Then open the Values dialog from the Parameters menu, enter a Direction value of 270 (degrees), and make sure Visibility is set to Show, which tells the picture to fly in from the left. Also enter PictureIsIn as the Completion Message.
 


 

You define the Fly action’s parameters in the Values dialog, instead of choosing In From Left from the Parameters menu, so you can trigger the next action with a custom message.

Action 3. Enter Custom, PictureIsIn in the When field; the Layout Region in the Target field; and Object, Delay in the Message field. Then open the Values dialog from the Parameters menu and enter DelayIsDone as the Custom Message, and 2 for the Delay value.

The arrival of the first slide triggers a two-second delay after which the DelayIsDone custom message is sent to trigger the next two actions.

Action 4. Enter Custom, DelayIsDone in the When field; the Layout Region in the Target field; Motion, Fly in the Message field; and Out To Right in the Parameters field.

After two seconds, the slide flies off the page.

Action 5. Enter Custom, DelayIsDone in the When field; the Layout Region in the Target field (you change this later); and Custom, ShowPicture in the Message field.

Also after two seconds, another slide flies onto the page.

  1. Create the second slide by copying and pasting the entire Layout Region, and placing the copy directly on top of (not inside) the first Region.

Copying the Layout Region copies its actions, too, so you don’t have to add the same actions over and over to subsequent slides.

To stack Layout Regions without inserting one in the other, select the Regions and align them using the Align buttons on the Multi-Object Properties Palette.

  1. Select the new Layout Region, replace its contents with the contents for your second slide, and delete its first action from the Actions tab on the Properties palette.

To make sure you’re working with the second Layout Region’s actions, open the Object Tree palette (from the View menu choose Palettes, Object Tree), and select the Region.

  1. Copy and paste the second Layout Region once for each remaining slide. Align the resulting Regions on top of each other as you did in step 5. While working with each Layout Region, replace its contents with those for a new slide.

You can uncover a Layout Region to work on in Page view by selecting Regions in the Object Tree palette and using the Hide Object or Show Object command on the Object menu. Also in the Object Tree palette, you can rename Regions Slide1, Slide2, and so on to keep track of which slide is which.

  1. Edit the last action of all but the last slide so it targets the next slide in the show.

Double-click the action on the Actions tab of the Properties palette to open the Set Action dialog and change the target.
 


 

  1. For the last slide, deactivate all but the first action by clearing the box to the left of the action.

By deactivating rather than deleting actions that target another currently nonexistent slide, you can easily add slides to your show later by reactivating and targeting the actions at a new slide.

Make sure Fixed Page Layout is selected as the HTML output method on the Layout Properties palette and that Word wrap is cleared in the HTML Options dialog you access from the Site Settings General tab. Then preview the page to test your slide show.

Loading the page sends a ShowPicture action to the first slide, triggering it to fly onto the page. The completion of the Fly action sends a message that triggers a two-second delay, after which another custom message triggers both the exit of the current slide and the entrance of the next.