PowerPoint articles

OneNote articles

 

Recommended Links, Newsgroups, and Newsletters

 

Get Help directly from Kathy

 

 

Google
 
Web www.onppt.com

     

    A Sound Solution: Playing Music on HTML Presentations

    A question posted frequently on the PowerPoint newsgroup is: Why won't the music continue when my presentation is saved as HTML?

    The situation usually is that someone has spent the time to create a wonderful slide show with music set to start on the first slide and run throught the entire presentation. Unfortunately, when the presentation is saved as HTML, and it is tested, the music plays only on the first slide. If the presentation is converted to AVI, the presentation stays on the first slide until the music finishes.

    The standard solution to this problem is to split the music into multiple files, each about the length of the slide. Then, embed the small files on each slide. This is cumbersome, creates extra files which need to be uploaded and maintained, and requires a separate piece of software to edit the music files.

    I am here to offer an alternative method: Take the music out of the presentation and place it on the index or home page instead. To do this takes a few steps, and a little HTML code, but creates a presentation with your sound turned on.

    "But wait," you say, "I don't know how to change that crazy HTML that Microsoft makes!"

    Don't worry. This article will not only explain what to do, it will also give you exact HTML code and tell you where to put it in the file. What is more, it has been tested with the HTML builder for both PowerPoint 2000 and PowerPoint 2002. (The PPT 2000 fix comes first. For the PPT 2002, scroll down to the end of this article.)

    PowerPoint 2000 HTML Fix

    When a PowerPoint presentation is converted to HTML, the presentation is placed into a framed environment which you target for Internet Explorer, Netscape, or both browsers. To make your music work, you will need remove your sound from your presentation and do the following three bits of coding:

    1. Create a file entitled "playsound.htm"
    2. Reference the playsound file from the Internet Explorer frame HTML
    3. Reference the playsound file from the Netscape frame HTML.

    Create the HTML

    The first step in all this is to create the HTML for your presentation. Do this in PowerPoint, using the "Save as Web Page..." option from the "File" menu. This option brings up the normal save box, which has an additional button labeled "Publish". Clicking this button brings up the following window:

    Press the publish page to create your HTML pages. Note: I did not change any of the options in tabs on this box, other than to ensure that all browsers are supported by the code to be generated.

    Create the HTML file

    Now that you have the base HTML files, you need to create a file which references your music. To do this, use Notepad (or equivalent) to create a file named "playsound.htm" The contents of this file should be as follows:

    <html>

    <head>
    <meta http-equiv=Content-Type content="text/html; charset=windows-1252">
    <meta name=ProgId content=PowerPoint.Slide>
    <meta name=Generator content="Microsoft PowerPoint 10">
    <link id=Main-File rel=Main-File href="../PRISMTest.htm">
    <link rel=Preview href=preview.wmf>

    </head>
    <P><EMBED SRC="http://www.URLForSoundFile.com" type="application/mpeg" NAME="Music" ALT="Classical Music Piece Plays in the Background Here" ALIGN=LEFT WIDTH=20% HEIGHT=31%><BR CLEAR=LEFT><BR><BR> </P>

    </html>

    Be sure to replace "http://www.URLForSoundFile.com" with the actual URL for your sound file.

    Save this file in the folder that PowerPoint created when it converted your presentation.

    Reference the new file from the HTML for Internet Explorer

    The next step is to adapt the file "frame.htm" This file is the index file for viewing your presentation in Internet Explorer. It can be found in the folder which was created when your presentation was created.You need to adapt this file to add a third column to the bottom row in the frameset. This new spot will be a placeholder for your music file.

    First, you need to change the frameset's definition for this column. About five lines from the bottom of the file, you should find a line which reads: <frameset cols="*,495">

    Change this line so that it reads: <frameset cols="*,25,495">

    This changes the last row of your frameset to have three columns instead of two.

    Next, you need to add the actual frame which will contain your sound file. Find the last two frame commands. Add a blank line between the two commands. On that line, add the following command: <frame src=playsound.htm title="Sound" name="SoundSpot">

    Your Netscape HTML is now ready to go. Next up...

    Reference the new file from the HTML for Netscape

    This step is exactly the same as the Internet Explorer step, only you will be making the changes in the file "v3_download.htm". This file is the index file for viewing your presentation in Netscape. It can be found in the folder which was created when your presentation was created.

    Upload the files and test

    Your final step is to upload the entire set of files from your hard drive to the server from which they will be referenced. Be sure to move both the folder and the file that were created when your presentation was converted.

    Voila! You now have music which will play during the entire presentation. It will play from begining to end, whether the user is viewing the presentation a slide at a time, or from start to finish. Try it yourself and see!

    Update - PowerPoint 2003 HTML Fix

    Michael Koerner [MS PPT MVP] discovered that the above process does not work when using PPT2002. After much work (and some assistance from Gus Collot), he found the resolution and has graciously allowed me to post it here for future reference.

    Unfortunately, the above procedure doesn't work with XP. I have found that if you want a background sound throughout your entire presentation the easiest way is to insert the following in the file fullscreen.html.

    <html> <bgsound src="yourmusic.wma" loop=infinite> <head>

    If, when you publish to the web, you remove the checkmark from the "Allow Navigation" box on the "General" dialog box, you need to put the same code into the frame.html file. This needs to be done because with the navigation controls gone, the fullscreen.html file is not generated.

    Making this change in the appropriate file allows the music to start only when you enter Slideshow mode regardless of which slide you enter Slideshow mode from. Once you are in Slideshow mode, the music continues regardless of which way you go (backwards or forwards).

    I have found that it works with all types of sound files wav, mp3, wma/asf, midi etc.

    Michael has put together a PowerPoint web presentation to explain the best ways to convert PowerPoint to HTML. Check out this presentation for more details!

    Thank you Michael for your hard work in figuring out this piece of the puzzle!

     

 

 

 

Insert Google ads here