(1) Create a new file, as shown in Figure 36-1.
(2) Save the page and insert the picture. To insert a picture without prompting for a relative path, first save the page as "36.htm". Then insert the picture you want to preload, as shown in Figure 36-2.
Figure 36-2 Inserting a picture
(3) Add the "Pre-loading image" feature. Use the Dreamweaver behavior panel to add the pre-load image feature, as shown in Figure 36-3.
(4) Select the picture you want to preload, as shown in Figure 36-4.
Tip: If you have several large pictures on your site, you can click the + icon above the preload image to add more than one preload image, as shown in Figure 36-4.
(5) Save the file to complete the operation. This can speed up the download speed of pictures, so that users will not wait too long when browsing the web, which is very important to improve the effectiveness of the site.
Random Advertising Pictures
When browsing the web, viewers can find that the dynamically updated AD images in the Web page are more dynamic and attractive than static fixed images. How to make the random advertisement picture in the webpage is the problem that this example wants to study.
Effect description When you browse the page, an ad picture appears in the banner area of the page, as shown in Figure 38-1. The ad images are then updated every two seconds, and the ad images appear in random ways, as shown in Figure 38-2.
Creative thinking through the use of Macromedia Extension advance_random_images, you can easily complete the Web page of the production of random advertising pictures.
(1) Install the plugin. Use the commands in the menu bar | The Extended Management command to bring up the Macromedia Extension Manager dialog box and install the advance_random_images extension, as shown in Figure 38-3.
(2) invoke the command. Open the banner.htm file in the source folder of this instance, place the cursor where you want to insert the advertisement, and bring up the "advancedrandomimages" command, as shown in Figure 38-4.
(3) Set the image. Set the picture transformation properties in the pop-up Randomimages dialog box, as shown in Figure 38-5.
(4) Add a picture. Add the first ad picture, as shown in Figure 38-6.
Tip: The picture used in this instance is placed in the banner folder in the material folder of this instance.
(5) Then use the same method to add other pictures, after the completion of the add click "OK" button to determine the operation, as shown in Figure 38-7.
(6) and then save the page file and preview, the effect of random advertising pictures are produced. The reader can refer to the bannerok.htm effect file in the sample material folder to see if the results are correct. This example is completed.