Sams Teach Yourself HTML 4 in 24 Hours
- Table of Contents
- Copyright
- About the Author
- Acknowledgments
- Tell Us What You Think!
- Put Your HTML Page Online Today
- I. Your First Web Page
- Hour 1. Understanding HTML and XML
- Hour 2. Create a Web Page Right Now
- Hour 3. Linking to Other Web Pages
- Hour 4. Publishing Your HTML Pages
- II. Web Page Text
- Hour 5. Text Alignment and Lists
- Hour 6. Text Formatting and Font Control
- Hour 7. Email Links and Links Within a Page
- Hour 8. Creating HTML Forms
- III. Web Page Graphics
- Hour 9. Creating Your Own Web Page Graphics
- Hour 10. Putting Graphics on a Web Page
- Hour 11. Custom Backgrounds and Colors
- Hour 12. Creating Animated Graphics
- IV. Web Page Design
- Hour 13. Page Design and Layout
- Hour 14. Graphical Links and Imagemaps
- Hour 15. Advanced Layout with Tables
- Hour 16. Using Style Sheets
- V. Dynamic Web Pages
- Hour 17. Embedding Multimedia in Web Pages
- Hour 18. Interactive Pages with Applets and ActiveX
- The Old Way
- Internet Programming for the Rest of Us
- Strong Java
- ActiveX Controls
- Using ActiveX to Embed a Video
- Summary
- Q&A
- Workshop
- Hour 19. Web Page Scripting for Non-Programmers
- Hour 20. Setting Pages in Motion with Dynamic HTML
- VI. Building a Web Site
- Hour 21. Multipage Layout with Frames
- Hour 22. Organizing and Managing a Web Site
- Hour 23. Helping People Find Your Web Pages
- Hour 24. Planning for the Future of HTML
- VII. Appendixes
- A. Readers' Most Frequently Asked Questions
- B. HTML Learning Resources on the Internet
- C. Complete HTML 4 Quick Reference
- D. HTML Character Entities
Using ActiveX to Embed a Video
ActiveX controls can do anything a programmer can cook up, but there is one specific ActiveX control included with Microsoft Internet Explorer that you should definitely know how to use. The ActiveMovie control is the Microsoft equivalent of Netscape's LiveVideo plug-in. Using ActiveMovie is currently the most reliable way to play a video in Microsoft Internet Explorer without displaying the clunky controls you get when the Windows Media player is embedded in a Web page.
Figure 18.5 shows the classid and <param /> options you need to know to use the ActiveMovie control. (The parameters are pretty self-explanatory, as long as you know that "1" means yes/on and "O" means no/off.) Take a look at Figure 18.6. This ActiveX object creates exactly the same effect in Microsoft Internet Explorer 4 and 5 as the <embed /> example from Hour 17 creates for Netscape Navigator 4.
Figure 18.5 You can use the ActiveMovie control to play a video with the <object> tag shown here.
Figure 18.6 The page listed in Figure 18.5 looks the same in both Netscape Navigator and Microsoft Internet Explorer.
Notice that I included the Netscape <embed /> tag between the <object> and </object> tags in Figure 18.5. If an <object> tag is successful in embedding the object it refers to (in this case, the ActiveMovie control), it will ignore all the HTML up to its closing </object> tag (except any <param /> tags). However, if the requested object can't be found or displayed for any reason, the rest of the HTML in front of the closing </object> tag is not ignored. In this case, that means that if the <object> tag doesn't work (probably because someone isn't using Microsoft Internet Explorer as his or her browser), the <embed /> tag will be called on instead. Therefore, the page will work nicely in both Microsoft Internet Explorer and Netscape Navigator.
As a last resort, an image linked to the video is included between <noembed> and </noembed> tags. This won't be seen by any recent version of Microsoft Internet Explorer or Netscape Navigator; it's just there for other Web browsers that don't support either ActiveX or embedded multimedia.
Summary | Next Section

Account Sign In
View your cart