javascript - SilverStripe CMS Unity3D Web Player Embedding Issue -
i trying add unity3d (www.unity3d.com) web player site silverstripe cms version 2.4.5. seems happen ss dynamically removing code contains web player. leaves closing div tag.
it simple simple static page embed web player. need following code , works perfectly. html:
<script type="text/javascript" src="http://webplayer.unity3d.com/download_webplayer-3.x/3.0/uo/unityobject.js"></script> <script type="text/javascript"> <!-- //gets unityplayer div , replaces content embed tag web player made unity (it works outside of ss.) function getunity() { if (typeof unityobject != "undefined") { return unityobject.getobjectbyid("unityplayer"); } return null; } //sets parameters of web player if (typeof unityobject != "undefined") { unityobject.embedunity("unityplayer", "mazepuzzle.unity3d", 720, 450); } --> </script> <div id="unityplayer"> <div class="missing"> <a href="http://unity3d.com/webplayer/" title="unity web player. install now!"> <img alt="unity web player. install now!" src="http://webplayer.unity3d.com/installation/getunity.png" width="193" height="63" /> </a> </div> </div>
well answer seems here: http://silverstripe.org/general-questions/show/16556?start=0.
Comments
Post a Comment