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 (Figure 26.8). For example, rolling over Image A causes Image B to change to Image B1.

Figure 26.8. Rolling over the Home button or the Search button triggers a change in the description image below the navigation menu.

graphics/26fig08.jpg


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 replace Image B with Image B1.

To build a Disjoint Rollover, 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.

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 (Figure 26.9).

Figure 26.9. The Swap Image dialog box enables you to select the target slice for the Disjoint Rollover.

graphics/26fig09.jpg


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.

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

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.

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



Using Macromedia Studio MX 2004
Special Edition Using Macromedia Studio MX 2004
ISBN: 0789730421
EAN: 2147483647
Year: N/A
Pages: 339

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