Java Reference
In-Depth Information
You then accessed it via script just by typing this:
document.audioPlayer.Play()
However, if you are scripting a Flash player, you need to add the following attribute to the <embed/>
defi nition in the HTML:
swliveconnect=”true”
Otherwise, any attempts to access the plug-in will result in errors.
<embed name=”map” swLiveConnect=”true” src=”topmenu.swf”
width=”300” height=”200”
pluginspage=”http://http://www.macromedia.com/go/getflashplayer”>
It's very important to study any available documentation that comes with a plug-in to check that there
are no subtle problems.
Differences Between Operating Systems
Support for ActiveX controls varies greatly between different operating systems. IE for the Mac supports
it, but not as well as under Win32 operating systems, such as Windows 2000, XP, and Vista. You also need
to be aware that an ActiveX control written for Win32 will not work on the Mac; you need to make sure a
Mac-specifi c control is downloaded.
IE on the Mac supports plug-ins as well as ActiveX controls; so, for example, Flash is a plug-in on the
Mac and an ActiveX control on Win32. Clearly, if you want to support both Mac and Windows users,
you need to write more complex code.
It's very important to check which operating system the user is running (for example, using the scripts
given at the end of Chapter 6) and deal with any problems that may arise.
Differences Between Different Versions of the Same Plug-in or
ActiveX Control
Creators of plug-ins and controls will often periodically release new versions with new features. If you
make use of these new features, you need to make sure not only that the user has the right plug-in or
ActiveX control loaded, but also that it is the right version.
ActiveX Controls
With ActiveX controls, you can add version information in the codebase attribute of the <object/>
element.
<object classid=clsid:AAA03-8BE4-11CF-B84B-0020AFBBCCFA
id=”myControl”
codebase=”http://myserver/mycontrol.cab#version=3,0,0,0”>
</object>
Now, not only will the browser check that the control is installed on the user's system, but it also checks
that the installed version is version 3 or greater.
Search WWH ::




Custom Search