I believe many people often hear music when they open entertainment websites or personal homepages. This example describes how to implement a random background music playback on a Web page.
Effect description
Create a file, loop into the music to play, you can create a dynamic background music, but also random. For the actual effect, please browse the corresponding file under "Source Files" on the CD with the book.
Creative Thinking
Open the Dreamweaver MX 2004 software new page, and then select the "+" option under the Behaviors panel to interrupt the music and set the parameters. Then repeat this operation 4 times, and you can play background music randomly.
Operation Steps
(1) Open the Dreamweaver MX 2004 software to create a new file and save the page.
(2) Select the Label page and insert the music file you want to play in the behaviors panel, as shown in Figure 55-1.
(3) then select the inserted sound file, open the Parameters window, set its parameters, as shown in Figure 55-2.
(4) Repeat the operations shown in figures 55-1 and 55-2 to 4 times, adding 4 kinds of music so that the program can randomly pick one of the four songs to play. Therefore, the fourth step shown in Figure 55-1 is to select a different music file.
(5) Save the file and complete the operation. The proper placement of a relaxed music background can make the user feel more relaxed and happy.
Note : For more wonderful tutorials, please pay attention to the triple web Design Tutorial section,