Previous Section  < Day Day Up >  Next Section

13.5 ActiveX Controls

ActiveX controls are miniature applications that work like plug-ins in Web browsers. In fact, Flash Player for the Windows version of Internet Explorer is an ActiveX control.

However, this powerful technology can handle much more than multimedia; it can plug right into your computer, accessing files and other programs, or enabling spreadsheets and other productivity programs, right in a Web page.

Unfortunately, this Microsoft technology only works on Windows machines and only in Internet Explorer. As a result, it has yet to gain a foothold on the Web梐nd it may never. But if you're required to incorporate an ActiveX control into your site (perhaps because Microsoft is your client), then here's how to do it.

To insert ActiveX controls that you've programmed in Visual Basic or found on the Web, just choose InsertMediaActiveX. An ActiveX icon appears on the Web page, selected so that you can now change its options using the Property inspector.

13.5.1 ActiveX Properties

Some of the settings you can change for ActiveX controls are the same as you'd find for the other technologies described in this chapter (see Figure 13-10): name, width/height, alignment, and margins, for example. A few others are unique to this technology:

13.5.1.1 ClassID

The ClassID identifies the ActiveX control for the browser. Dreamweaver includes three ClassIDs in the pop-up menu: Real Player, Shockwave, and Flash. (Selecting either of the last two simply changes the ActiveX icon on the page to either Shockwave or Flash.) The Real Player option lets you insert a control for including Real Video or Audio files on a page.

ActiveX controls vary widely; there's no standard set of properties.
figs/13_10.jpg
13.5.1.2 Embed and Src

If there is a comparable Netscape plug-in for the ActiveX control you're adding to the page, you can turn on the Embed checkbox to add the <embed> tag. This way, Netscape and Mac users can also enjoy the benefits provided by the ActiveX control.

The HTML <object> tag specifies the ActiveX control and its properties. Netscape Navigator, on the other hand, uses the <embed> tag for adding plug-ins. Some external multimedia files, such as Flash, Shockwave, and Real Video, can use either an ActiveX control or a plug-in. In order to make both the ActiveX control and the Netscape plug-in available, you need to have both <object> and <embed> tags in the HTML code for your page (see the box in Section 13.1.2).

If you turn on the Embed checkbox, you'll need to specify a file for the plug-in to use in Netscape. For example, a .swf (Flash movie) file would be used as a source (Src) file for the Flash Player plug-in. To choose a file, click the folder icon and select it from your site folder (if it's not already there, Dreamweaver offers to copy it there for you).

  • Base. The Base field indicates the URL for the ActiveX control. If the visitor doesn't already have the ActiveX control on her PC, Internet Explorer will go to this URL, download the control, and install it.

  • ID. An ActiveX control's ID is used to pass information to other ActiveX controls.

  • Data. Some ActiveX controls require an additional data file. Enter the name of that file in this field. Consult the instructions for your particular ActiveX control to find out if an additional file is necessary.

  • Alt. For browsers that don't support the <object> tag, you can provide an alternative image. Click the folder icon and select a GIF or JPEG file from your Web site. Because ActiveX only works in one browser and one platform, give strong consideration to providing an Alt image: "Sorry, you're out of luck! Buy a Windows PC and use Internet Explorer next time!" (This option doesn't work if you've turned on the Embed checkbox in the Property inspector.)

    Previous Section  < Day Day Up >  Next Section