|
|
#1
| |||
| |||
| WMPlayer at web page: error loading object I'm using the example at page http://support.microsoft.com/default...b/279022/en-us and I only getting the error "can not create object". Current system is: Windows XP 5.1.2600 Service Pack 2.0 WMPlayer 11.0.5721.5145 IExplorer 6.0.2900.2180.xpsp_sp2_gdr Thanks, yours, Daniel from Brazil ======================== The code is this: <html> <body> <SCRIPT> var WMP7; if(window.ActiveXObject) { WMP7 = new ActiveXObject("WMPlayer.OCX.7"); alert("window.ActiveXObject:"+WMP7); } else if (window.GeckoActiveXObject) { WMP7 = new GeckoActiveXObject("WMPlayer.OCX.7"); alert('window.GeckoActiveXObject:'+WMP7); } else { alert('ops! nenhum objeto foi criado!'); } // Windows Media Player 7 Code if ( WMP7 ) { alert ('WMP 7<p>'); document.write ('<OBJECT ID=MediaPlayer '); document.write (' CLASSID=CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6'); document.write (' standby="Loading Microsoft Windows Media Player components..."'); document.write (' TYPE="application/x-oleobject" width="286" height="225">'); document.write ('<PARAM NAME="url" VALUE="http://ncnetshow/station1.asx">'); document.write ('<PARAM NAME="AutoStart" VALUE="true">'); document.write ('<PARAM NAME="ShowControls" VALUE="1">'); document.write ('<PARAM NAME="uiMode" VALUE="mini">'); document.write ('</OBJECT>'); } // Windows Media Player 6.4 Code else { //IE Code alert ('WMP 6.4 IE<p>'); document.write ('<OBJECT ID=MediaPlayer '); document.write ('CLASSID=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95 '); document.write ('CODEBASE=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715 '); document.write ('standby="Loading Microsoft Windows Media Player components..." '); document.write ('TYPE="application/x-oleobject" width="286" height="225">'); document.write ('<PARAM NAME="FileName" VALUE="http://ncnetshow/station1.asx">'); document.write ('<PARAM NAME="AutoStart" VALUE="true">'); document.write ('<PARAM NAME="ShowControls" VALUE="1">'); //Netscape code alert('WMP 6.4 EMBED Netscape'); document.write (' <Embed type="application/x-mplayer2"'); document.write (' pluginspage="http://www.microsoft.com/windows/windowsmedia/"'); document.write (' filename="http://ncnetshow/station1.asx"'); document.write (' src="http://ncnetshow/station1.asx"'); document.write (' Name=MediaPlayer'); document.write (' ShowControls=1'); document.write (' ShowDisplay=1'); document.write (' ShowStatusBar=1'); document.write (' width=290'); document.write (' height=320>'); document.write (' </embed>'); document.write ('</OBJECT>'); } </script> <body> </html> |
| |
|
#2
| |||
| |||
| Re: WMPlayer at web page: error loading object It's probably redundant to do this. Any windows system apart from early windows 95 machines is likely to have WMP7 or later on it. I don't think many of those are knocking about, according to our weblogs, and even if they are, is it a business requirement that you support machines having *only* WMP6.4 on them ? If not, just write out the WMP7+ embedding code. Cheers - Neil On Fri, 20 Jul 2007 21:06:01 -0700, Daniel <Daniel@discussions.microsoft.com> wrote: >I'm using the example at page >http://support.microsoft.com/default...b/279022/en-us and I only getting >the error "can not create object". > >Current system is: >Windows XP 5.1.2600 >Service Pack 2.0 >WMPlayer 11.0.5721.5145 >IExplorer 6.0.2900.2180.xpsp_sp2_gdr > >Thanks, yours, Daniel >from Brazil > >======================== >The code is this: > ><html> ><body> > ><SCRIPT> > >var WMP7; > >if(window.ActiveXObject) >{ > WMP7 = new ActiveXObject("WMPlayer.OCX.7"); > alert("window.ActiveXObject:"+WMP7); >} >else if (window.GeckoActiveXObject) >{ > WMP7 = new GeckoActiveXObject("WMPlayer.OCX.7"); > alert('window.GeckoActiveXObject:'+WMP7); >} >else { > alert('ops! nenhum objeto foi criado!'); > >} > > >// Windows Media Player 7 Code >if ( WMP7 ) >{ > alert ('WMP 7<p>'); > document.write ('<OBJECT ID=MediaPlayer '); > document.write (' CLASSID=CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6'); > document.write (' standby="Loading Microsoft Windows Media Player >components..."'); > document.write (' TYPE="application/x-oleobject" width="286" >height="225">'); > document.write ('<PARAM NAME="url" >VALUE="http://ncnetshow/station1.asx">'); > document.write ('<PARAM NAME="AutoStart" VALUE="true">'); > document.write ('<PARAM NAME="ShowControls" VALUE="1">'); > document.write ('<PARAM NAME="uiMode" VALUE="mini">'); > document.write ('</OBJECT>'); >} > >// Windows Media Player 6.4 Code >else >{ > //IE Code > alert ('WMP 6.4 IE<p>'); > document.write ('<OBJECT ID=MediaPlayer '); > document.write ('CLASSID=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95 '); > document.write >('CODEBASE=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715 '); > document.write ('standby="Loading Microsoft Windows Media Player >components..." '); > document.write ('TYPE="application/x-oleobject" width="286" >height="225">'); > document.write ('<PARAM NAME="FileName" >VALUE="http://ncnetshow/station1.asx">'); > document.write ('<PARAM NAME="AutoStart" VALUE="true">'); > document.write ('<PARAM NAME="ShowControls" VALUE="1">'); > > //Netscape code > alert('WMP 6.4 EMBED Netscape'); > document.write (' <Embed type="application/x-mplayer2"'); > document.write (' >pluginspage="http://www.microsoft.com/windows/windowsmedia/"'); > document.write (' filename="http://ncnetshow/station1.asx"'); > document.write (' src="http://ncnetshow/station1.asx"'); > document.write (' Name=MediaPlayer'); > document.write (' ShowControls=1'); > document.write (' ShowDisplay=1'); > document.write (' ShowStatusBar=1'); > document.write (' width=290'); > document.write (' height=320>'); > document.write (' </embed>'); > > document.write ('</OBJECT>'); >} > ></script> ><body> ></html> ------------------------------------------------ Digital Media MVP : 2004-2007 http://mvp.support.microsoft.com/mvpfaqs |
|
#3
| |||
| |||
| Re: WMPlayer at web page: error loading object Neil, thanks very much for answering, but the question is not about version but to what is happening that the code does not work. There is sometimes a problem at IExplorer to create the WMP object. I didn't find solutions or information at KBase nor at internet. IExplorer is not good at showing help screens at javascript failures. Then I ask again: why is IE failing to create the object? Look that WMP is working without problems. Is there some politic privacy secutiry option? Well, thanks anyway. Yours, Daniel |
|
#4
| |||
| |||
| Re: WMPlayer at web page: error loading object On Tue, 24 Jul 2007 17:46:01 -0700, Daniel <Daniel@discussions.microsoft.com> wrote: >Neil, thanks very much for answering, but the question is not about version >but to what is happening that the code does not work. > >There is sometimes a problem at IExplorer to create the WMP object. >I didn't find solutions or information at KBase nor at internet. >IExplorer is not good at showing help screens at javascript failures. > >Then I ask again: why is IE failing to create the object? >Look that WMP is working without problems. Is there some politic privacy >secutiry option? Not really - ActiveX controls can be disabled in the browser at the users option - as can javascript. If you have Javascript available in the browser, the best way is to use try... catch blocks around the code to check for player object instantiation. That would require javascript 1.2 and later - current browsers have at least Javascript 1.5 as far as I can tell. If you're unable to bring up the player, fallback to a link to the content, and make it unambiguous what player is required to play the content - if it's MP3 audio it doesn't really *mateter* which player plays it, if it's WMA or WMV then you usually need WMP installed. Cheers - Neil ------------------------------------------------ Digital Media MVP : 2004-2007 http://mvp.support.microsoft.com/mvpfaqs |
| Bookmarks |
| Thread Tools | |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Shockwave Flash Object - slow loading of web pages in IE7 / Vista | Robert Salasidis | Internet Explorer | 6 | 07-01-2007 07:10 PM |
| Run time error loading web home page | Kas | Windows XP | 5 | 06-24-2007 08:20 PM |
| Help: Not seeing variable defined in OBJECT-loaded page | muggler | Internet Explorer | 1 | 05-06-2007 10:16 AM |
| Page Loading;Web page header | gurusan | Internet Explorer | 0 | 05-06-2007 07:11 AM |
| ERROR: Could not create an ICertificate object & message 32 error | Pocket PC General | 3 | 01-15-2007 09:58 AM | |
| New To Technology Questions? | Do You Need Help with Your Computer or Device? | Do You Need Help with this site? |