Microsoft's suggested way of embedding Windows format movies and sounds on your Web page still requires the use of the old nonstandard embed tagif you want it to work in anything besides Internet Explorer for Windows. I'll show you how to embed it in a standards-compliant way on page 304.
1. | Create the desired movie or sound. |
2. | In your (X)HTML document, type <object class . |
3. | Next type width="w" height="h", where w and h are the size in pixels of the media player that you'd like to embed. |
4. | Type > to complete the initial object tag. |
5. | To tell the player where the media file is, type <param name="url" value="movie.wmv">, where movie.wmv is the name and extension of the movie file. Figure 18.42. Microsoft recommends using the object element in a non-standard way and the non-standard embed element. |
6. | If desired, you can type <param name="autostart" value="false"> in order to keep the file from playing automatically. The default is TRue. |
7. | If desired, you can type <param name="showcontrols" value="false"> to hide the play, rewind and other control buttons. The default value is true. |
8. | For browsers besides Internet Explorer, type <embed type="application/xmplayer2" to tell them what to expect. Figure 18.43. The Windows Media Player is embedded in the page. |
9. | Next type src="/books/2/62/1/html/2/http://www.movie.wmv", where movie.wmv is the location, name, and extension of the movie file. |
| |
10. | Type width="w" height="h">, where w and h are the dimensions in pixels of your movie file. |
11. | If you want the movie to start playing automatically, type autostart="true". |
12. | If you want to hide the control buttons, type showcontrols="false". |
13. | Type /> to complete the embed element. |