Internet Explorer 7 Problems

I can’t get Unity webplayer apps to run in IE7 on Windows.

I get the “Hit Enter or Spacebar” text prompt, hit the key, then the Unity player displatys “Failed to download data file”. That’s as far as it gets.

I’m guessing that while Windows is holding things up for me to hit the key, the plugin times out and gives up.

Has anyone else encountered/solved this yet?

No, I’ve never seen this. Does it happen with all web players you try? Does it happen in other browsers? You’re not running a beta version of the plugin (when running beta it says so at the bottom while loading)?

I’d suggest running C:\Program Files\OverTheEdge\Unity\WebPlayer\UnityBugReporter.exe and filing a bug. This at least will get us your machine specs.

Looks like the problem is in my HTML, specifally the HTML that lets me use a custom loading image (Pro feature). And, since the page works on the Mac (in Safari), I’m guessing it is specifcally releated to the code that handles the Windows/Explorer page rendering.

The thing is, this HTML worked on the last version or so of the player and it’s pretty much a straight cut-n-paste of the standard code you guys put out to do this. So, I’m baffled.

I’ll attach the HTML file here.

TIA for your help!

Now if we’d actually see the html…

It’s the wieredest thing. I can’t the attachment thing in the forums site to work. I select the file, hit the Add Attachment button, then it just seems to reset the page.

Oh, well. I’m clearly cursed this weekend. :wink:

[edit: html code removed for brevity]

I haven’t actually tested it on IE7 yet, but one problem I see is that tags after “custom progress bar is setup here” comment are not closed. They should look like:

<param name="logoimage" value="mylogo.png" />

Now they seem to have closing ‘/>’ missing.

Doh!

That did it. Works fine now. Thanks, AP.

Well, it looks like it didn’t solve the problem.

Here’s a link to a site using the fixed code (which seemed to work locally) online.

As before, in IE7, I get a bunch of Windows security burps, then a “failed to load data” error in the plugin.

Any idea what might be up with this, AP?

Now I need the link… :wink:

I may be the stupidest human being alive.

[edited] link dead now

Marty:

  • Safari on OSX is the only browser in which this content seems to play at all. I tested using Safari and Firefox (2.0) on OSX, and in Firefox (2.0) and IE (6) on Windows. In Safari all played just fine, in Firefox on both platforms your custom loader screen appears then nothing happens (no progress bar motion, no error). In IE on Windows I see an error saying it was unable to download the data file.

Note: why it’s working in Safari and not Firefox eludes me for now…

  • In looking at your source code I notice that the src parameters are different for your ActiveX and Plugin tag cases. In the object tag your source is “app.unityweb” wheres in the embed tag it’s “content/app.unityweb”.

I’m sure the problem stems from my having to hack that code that let’s Pro users substitute their own loading graphics.

Let me fix the inconsistency Tom found and give it another try …

Heya, Aras!

HiggyB and I worked on this for a while and we’re stumped.

Long story short, if you go to my applet [edited: dead now] on a Mac (ie. Safari, FF) the applet loads fine, custom graphics and all.

But, if you go to the same URL on a Windoze box (ie. IE6, IE7), everything loads fine but the applet will not accept mouseclicks or keypresses.

The applet is a fresh 1.6.1 build and the webpage is based on 100% USDA certified Grade A Tom Higgins code.

Tom thinks the problem lies in the applet. I think there may be evil spirites involved.

Help!

And now Marty I have other theories, including a potential snag when attempting to view content in IE on Windows under Parallels. We’ll post again later when we have a few more details.

Let the bug hunting begin…

Ok, I found the bug. The problem is in Unity’s Internet Explorer plugin that deals with this “activation of ActiveX controls” and was caused by misleading Microsoft’s documentation…

Basically, if you load content from external .js file (to get plugin automatically activated), it won’t accept the input. So right now you’d have to fallback to the old method.

I have fixed the bug just now, and I hope we’ll release the fixed web plugin soon.

What’s the old method?

I got the same results from the code (with the embedded JS code) on the FAQ webpage (http://unity3d.com/Documentation/Manual/Customizing%20the%20Unity%20Web%20Player%20loading%20screen.html).

The old method is doing all that from the same .html file (like the doc page you linked to). I’ve got it working on your example, when I moved things from your external .js file to .html itself.

Could you post that HTML, AP?

I couldn’t get it to work that way on my side, so I’m sure I’m mucking up something in the cutting-n-pasting.

TIA!

I just commented out the line that loads external .js file and pasted the full contents of that below. In your file, here are the contents of table cell that displays the game (inside of

):

<script type="text/javascript" language="javascript">
function detectUnityWebPlayer () {

	// initiailize the installed flag
	var tInstalled = false;

	// check if the page being viewed in Internet Explorer on Windows or not
	if (navigator.appVersion.indexOf("MSIE") != -1  navigator.appVersion.toLowerCase().indexOf("win") != -1) {
		// perform ActiveX detection routine
		document.write('<script language=VBScript \> \n');
		document.write('on error resume next \n');
		document.write('set tControl = CreateObject("UnityWebPlayer.UnityWebPlayerAXCtrl.1") \n');
		document.write("if IsObject(tControl) then \n");
		document.write("tFound = 1 \n");
		document.write("else \n");
		document.write("tFound = 0 \n");
		document.write("end if \n");
		document.write('</script\> \n');
		tInstalled = (tFound == 1);
	} else {
		// perform plugin detection routine
		if (navigator.mimeTypes  navigator.mimeTypes["application/x-unity"]  navigator.mimeTypes["application/x-unity"].enabledPlugin) {
		  if (navigator.plugins  navigator.plugins["Unity Web Player"]) {
			// update the installed flag
			tInstalled = true;
		  }
		}
	}
	// return the installed flag
	return tInstalled;
}

function writeUnityTags (aSrc, aWidth, aHeight) {
	// write the object and embed tags
	document.write("<object ");
	document.write("    id='Unity' ");
	document.write("    classid='clsid:36D04559-44B7-45E0-BA81-E1508FAB359F' ");
	document.write("    width='" + aWidth + "' ");
	document.write("    height='" + aHeight + "' ");
	document.write("    codebase='http://otee.dk/download_webplayer/UnityWebPlayer.cab'> \n");
	document.write("    <param name='src' value='" + aSrc + "' /> \n");
	document.write("    <param name='backgroundcolor' value='000000' /> \n");
	document.write("    <param name='bordercolor' value='FFFFFF' /> \n");
	document.write("    <param name='logoimage' value='images/mylogo.png' /> \n");
	document.write("    <param name='progressbarimage' value='images/myprogressbar.png' /> \n");
	document.write("    <param name='progressframeimage' value='images/myprogressframe.png' /> \n");
	document.write("    <embed ");
	document.write("        id='Unity' ");
	document.write("        src='" + aSrc + "' ");
	document.write("        width='" + aWidth + "' ");
	document.write("        height='" + aHeight + "' ");
	document.write("        type='application/x-unity' pluginspage='http://otee.dk/getunityplayer.html' ");
	document.write("        backgroundcolor='000000' ");
	document.write("        bordercolor='FFFFFF' ");
	document.write("        logoimage='images/mylogo.png' ");
	document.write("        progressbarimage='images/myprogressbar.png' ");
	document.write("        progressframeimage='images/myprogressframe.png' ");
	document.write("    /> \n");
	document.write("</object>");

}
// check for the unity player
var tInstalled = detectUnityWebPlayer();
if (tInstalled == true) {
	writeUnityTags("content/app.unityweb",700,500);
} else {
	document.write("<table height='700' width='500' border='0' cellspacing='0' cellpadding='0' background='noinstallbg.gif'><tr valign='middle'><td> \n");
	document.write("<div align='center'> \n");
	document.write("This content requires the [url='http://unity3d.com/unitywebplayer.html']Unity Web Player[/url]. \n");
	document.write("</div> \n");
	document.write("</td></tr></table>");
}
</script>

The commented out line is on top, it’s safe to remove it entirely. Then inside come what used to be in the external file, then the code that was the originally.

Works fine here on IE7 (don’t have IE6 on this machine to test).