Swap Image

The Swap Image action swaps one image for another by changing the SRC attribute of the IMG tag. Use this action to create button rollovers and other image effects (including swapping more than one image at a time).

Note: Because only the SRC attribute is affected by this action, you should swap in an image that has the same dimensions (height and width) as the original in order to avoid distortion.

To use the Swap Image action:

1 Choose Insert > Image or click the Image button on the Object palette to insert an image.
2 In the Property inspector, enter a name for the image in the leftmost text entry field.
The Swap Image action still works if you do not name your images (it names unnamed images automatically when you attach the behavior to an object), but it is easier to determine which image is which in the Swap Image dialog box if all of the images are named beforehand.
3 Repeat steps 1 and 2 to insert additional images.
4 Follow steps 1 through 3 of the procedure in Attaching a behavior.
5 Select Swap Image from the Actions pop-up menu.
6 Select the image whose source you want to change from the Images list.
7 Enter the path and file name of the new image in the Set Source To field, or click Browse to select an image file.
8 Repeat steps 6 and 7 for any additional images you want to change.
9 Select the Preload Images option to load the new images into the browser's cache.
This prevents delays caused by downloading when it is time for the images to appear.
10 Click OK.
11 Check that the default event is the one you want.
If it isn't, select another event from the pop-up menu. If the events you want are not listed, change the target browser in the Events For pop-up menu.