Swap Image Behavior


Similar to the Simple Rollover is the Swap Image behavior. The Simple Rollover substitutes the contents of a frame slice with the contents of another frame slice. Although the Swap Image behavior can do that as well, it is mostly used to create disjoint rollovers.

When rolling over one image causes a different image to change, you have a disjoint rollover. For example, rolling over Image A causes Image B to change to Image B1 (see Figure 4.8).

Figure 4.8. Rolling over the Home button causes the text below the navigation buttons to appear as well. An image can have both a simple rollover and a disjoint rollover. Using the previous example, rolling over Image A would replace Image A with Image A1 and Image B with Image B1.


To build a disjoint rollover, follow these steps:

1.

Create all assets in their final positions. You need at least two frames and two slices. Use the Slice tool to add a slicing scheme over the affected areas of the document.

2.

Select the slice covering the trigger image. The trigger image is the image that users will roll over or click to make the disjoint behavior work. Click the Add Behavior (+) button in the Behaviors panel. Select Swap Image from the menu and the Swap Image dialog box appears (see Figure 4.9).

Figure 4.9. The Swap Image dialog box enables you to select the target slice for the disjoint rollover.


3.

Select the target slice. The target slice is the image that will be affected by the rollover action in the trigger image. You can select the slice in the list or select the slice thumbnail in the slice reconstruction window.

4.

Next, select an image to swap from a different frame or an external file. In this example you've already created the image that will be swapped, so select another frame.

Tip

Preload Images is selected by default to ensure that the swapped image is loaded before the user mouses over the image. I would suggest leaving this option checked to ensure that the swapped image executes quickly, without the new image having to be downloaded at the time of the swap

Restore Image onMouseOut is also the default if you want the original image to be swapped back in after the user rolls out of the trigger image.

5.

Click OK to apply the behavior and close the Swap Image dialog box.



Special Edition Using Macromedia Studio 8
Special Edition Using Macromedia Studio 8
ISBN: 0789733854
EAN: 2147483647
Year: 2003
Pages: 337

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net