Dreamweaver Example: Randomly play background music
Author:Eve Cole
Update Time:2009-05-31 21:50:07
I believe that many people often hear some music when they open an entertainment website or personal homepage. This example will introduce how to randomly play background music on a web page.
The effect description is to create a file and insert the music to be played in a loop to create dynamic background music, which is random. For the actual effect, please browse the corresponding files under [Source Files] on the CD accompanying the book.
Creative thoughts Open the new page of Dreamweaver MX 2004 software, then select the [+] option under the [Behavior] panel to insert music and set parameters. Then repeat this operation 4 times to 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 "Tag" page and insert the music file to be played in the "Behavior" panel, as shown in Figure 55-1.
(3) Then select the inserted sound file, open the parameter window, and set its parameters, as shown in Figure 55-2.
(4) Repeat the operations shown in Figure 55-1 and Figure 55-2 4 times, thus adding 4 types of music, so that the program can randomly select one of these four types of music to play. Therefore, the fourth step shown in Figure 55-1 involves selecting a different music file.
(5) Save the file and complete the operation. Properly placed relaxing music background can make users feel more relaxed and happy.