- Home /
Problems with MyLoader.png and 100% fit to page
Hi Community,
seems as if I wont solve following 2 Probs on my own:
The MyLoader.png (replaces with "Avatar.jpg" doesn´t work and also the 100% Fit to webpage wont work. Does anybody have an idea why ?
Thanks in advance
Phonc
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Web Player</title>
<script type="text/javascript" src="http://webplayer.unity3d.com/download_webplayer-3.x/3.0/uo/UnityObject.js"></script>
<script type="text/javascript">
<!--
function GetUnity() {
if (typeof unityObject != "undefined") {
return unityObject.getObjectById("unityPlayer");
}
return null;
}
if (typeof unityObject != "undefined") {
var params = {
backgroundcolor: "000000", // This part changes the backround color
bordercolor: "000000", // This part changes the border color
textcolor: "FFFFFF", // This part changes the color of some text.
logoimage: "Avatar.jpg", // What splash logo do you want?
// progressbarimage: "MyProgressBar.png", // What loading bar do you want?
// progressframeimage: "MyProgressFrame.png", // What loading bar border do youwant?
// disableFullscreen: false
};
unityObject.embedUnity("unityPlayer", "WebPlayer.unity3d", "100%", "100%", params);
}
-->
</script>
<style type="text/css">
<!--
body {
font-family: Helvetica, Verdana, Arial, sans-serif;
background-color: black;
color: white;
text-align: center;
}
a:link, a:visited {
color: #bfbfbf;
}
a:active, a:hover {
color: #bfbfbf;
}
p.header {
font-size: small;
}
p.header span {
font-weight: bold;
}
p.footer {
font-size: x-small;
}
div.content {
margin: auto;
width: 100%;
height: 100%;
}
div.missing {
margin: auto;
position: relative;
top: 50%;
width: 193px;
}
div.missing a {
height: 63px;
position: relative;
top: -31px;
}
div.missing img {
border-width: 0px;
}
div#unityPlayer {
cursor: default;
height: 100%;
width: 100%;
}
-->
</style>
</head>
<body>
<p class="header"> </p>
<p class="header"> </p>
<p class="header"> </p>
<p class="header"> </p>
<p class="header"> </p>
<div class="content">
<td align="center" height="100%">
<div id="unityPlayer">
<div class="missing">
<a href="http://unity3d.com/webplayer/" title="Unity Web Player. Installieren Sie bitte jetzt!">
<img alt="Unity Web Player. Installieren Sie bitte jetzt!" src="http://webplayer.unity3d.com/installation/getunity.png" width="193" height="63" />
</a>
</div>
</div>
</div>
<p class="footer"> </p>
</body>
</html>
Answer by phonc · Aug 08, 2011 at 07:28 AM
Anybody? I searched the Forum and google and it seems as if it is a problem for many people. It doesn´t seem to be as easy as written in the documentation.
$$anonymous$$aybe if your question was clearer. I certainly don't understand it.
Answer by Waz · Aug 08, 2011 at 09:35 AM
Needs to be PNG, not JPG.
Needs to be pixel value, not percentage.
Fitting to page is hard, but not impossible - you'll have to test and work around many behaviours in different browser versions. It's a question for HTML forums though, not here. I've done it once, but too ugly to show here, sorry.
Basically, you need to dynamically change the unity element size as the window initialises and resizes variously (browsers are quite variable on this). The Unity element is nothing special in this sense, so whatever would work for other fixed-size element will work for the unity element.
Answer by phonc · Aug 08, 2011 at 12:13 PM
Yeah, you´re great, man! Thanx a lot.
I solved the 100% problem with:
-->
and the Logo.jpg with your hint (logo.png)
Answer by sputnik · Dec 09, 2012 at 08:53 PM
Yes it is a problem also for me! I've pro version, customized the html page to pass a logo of mine according the instruction in http://docs.unity3d.com/Documentation/Manual/CustomizingtheUnityWebPlayerloadingscreen.html but logo remains the same. Why????
Hi There.
Please don't post comments as answers. Post comments by clicking the [add new comment] button, a window then open for you to type in. Answer fields are for answers only, as this is a knowledge base.
You can convert this answer to a comment (or just edit your original question), you'll also get a better chance of getting an actual answer if the main list shows none or one answer in blue =]
Under the answer where it says edit | delete | more , click on more , then convert to comment