Microsoft KB Archive/297477

= How to apply a background sound to a Web page in FrontPage =

Article ID: 297477

Article Last Modified on 10/28/2004

-

APPLIES TO


 * Microsoft FrontPage 2002 Standard Edition
 * Microsoft FrontPage 2000 Standard Edition

-



This article was previously published under Q297477



IN THIS TASK

 * SUMMARY
 * Step 1: Import the Background Sound File
 * Step 2: Assign the File As the Background Sound
 * Method 1: Set the Page Properties
 * Method 2: Edit the HTML Code
 * Step 3: Save and Preview the Page
 * REFERENCES

(back to top)



SUMMARY
This step-by-step article shows you how to import and add a background sound to your Web page. Some of the more popular background sound formats for Web pages are:

.aif  Audio Interchange Format File (AIFF) .au   Sun/Next Audio File .mid  MIDI Sequence File .mp3  MP3 Format Sound File .snd  Sun/Next Audio File .wav  Microsoft Windows Wave Sound File

(back to top)

Step 1: Import the Background Sound File
To import the file into your Web, follow these steps:
 * 1) Open a Web, and then switch to Folder view.
 * 2) In the Folder list pane, click the folder that you want to import the background sound file into. If you do not want to import the file into a specific folder, click the root folder (the first item in the Folder list pane).
 * 3) On the File menu, click Import.
 * 4) Click Add File.
 * 5) Select the file that you want to import, and then click Open.
 * 6) Click OK.

(back to top)

Step 2: Assign the File As the Background Sound
You can either use the Page Properties dialog box or you can edit the HTML code.

(back to top)

Method 1: Set the Page Properties
 In Normal view, right-click the page, and then click Page Properties on the menu that appears. Click the General tab. In the Background sound section, click the Browse button.NOTE: Some sound file formats, such as .mp3 files, are not displayed in the dialog box. For these files, you have to manually type the path of the background sound file in the dialog box. For example, if a file that is named Song.mp3 is stored in a folder that is named Music, this is how the path looks:

Music/Song.mp3

If the file is in the root, this is how the the path looks:

Song.mp3

 After you select a file or type the file name, click Open. In the Loop box, type or select a number to specify the number of times that you want the song to play. Click OK.</li></ol>

(back to top)

Method 2: Edit the HTML Code
<ol> Switch to HTML view.</li>  Type the <BGSOUND> tag between the <HEAD> tags. For example, if you want to use a file called Song.mp3 as the background sound file and this file is saved in a folder named Music, your <BGSOUND> tag looks similar to the following: <HEAD> <bgsound src=&quot;music/song.mp3&quot; loop=&quot;-1&quot;> </HEAD> </li>  If the Song.mp3 file is stored in the root instead of a specific folder in your Web, the <BGSOUND> tag looks similar to the following: <HEAD> <bgsound src=&quot;song.mp3&quot; loop=&quot;-1&quot;> </HEAD> </li></ol>

The following table explains the Loop values that you can set for the <BGSOUND> tag:

<pre class="fixed_text">  Loop Value     Description ---  -1             The background sound will play repeatedly as long as the page is open.

0 or 1        The background sound will play one time. n             The background sound will play n times, where n is a number greater than 1. (back to top)

Step 3: Save and Preview the Page

 * 1) On the File menu, click Save to save the Web page.
 * 2) Make sure that your speakers are working, and then click Preview in Browser on the File menu.

NOTE: The larger the size of the file, the longer it takes to load the page.

(back to top)

<div class="references_section">