BC98Part VIBonus Chapters11.Right-click the file and choose Properties. (Web server info)

BC98Part VIBonus Chapters11.Right-click the file and choose Properties. 12.Click the Version tab (if present). 13.Copy the version number (generally four sets of numbers delimited by commas), andpaste it into your document for future reference. Eventually, it will be assigned to thecodebaseattribute of the objectelement. You are now ready to try loading the plug-in as an object and look for properties youcan test for. 14.Add an objecttag to The Evaluator source code. This can go inside the heador justbefore the tag. For example, your tag should look something like the following: Copy and paste the numbers for the guidand version. Two points to watch out for: First, be sure that the guidvalue is preceded by CLSID:in the value assigned to classid; second, be sure the version numbers are preceded by the prefix shown. 15.Load (or reload) the page in WinIE4+. At this point, the wmpobject should exist. If the associated plug-in loads successfully, the wmpobject s properties include properties exposed by the plug-in. 16.Enter wmpinto the bottom text box to inspect properties of the wmpobject. Be patient: It may take many seconds for the retrieval of all properties. In case you can t readily distinguish between the objectelement object properties andproperties of the scriptable plug-in, scroll down to the wmp.innerHTMLproperty and itsvalues. When an object loads successfully, any parameters that it accepts are reflectedin the innerHTMLfor the objectelement. Each paramelement has a name the nameof one of the scriptable properties of the plug-in. 17.Look for one of the properties that has some kind of value by default (in other words, other than an empty string or false). In Windows Media Player, this can be CreationDate. Use this property as an object detection condition in scripts that need to accessthe Windows Media Player properties or methods: if (wmp && wmp.CreationDate) { // statements that talk to plug-in} Setting a minimum version numberThe four numbers that you grab in step 13 in the previous section represent the version of theplug-in as installed on your computer. Unless you have a way of verifying that your externalcontent runs on earlier versions of the plug-in (if there are earlier versions), you can safelyspecify yourversion as the minimum. Specificity rankings for the four numbers of a version decrease as you move from left to right. For example, version 9,0,25,2 is later than 9,0,0,0; version 10,0,0,0 is later than both of them. Ifyou specify 9,0,25,2, and the user has 9,0,24,0 installed, the plug-in does not load and the objectisn t available for scripting. On the other hand, a user with 9,0,26,0 has the object presentbecause the codebaseattribute for the version specifies a minimum allowable version to load.

Leave a Reply