Showing posts with label embedding. Show all posts
Showing posts with label embedding. Show all posts

Thursday, October 30, 2008

Embedding Silverlight in blogger

A post to test embedding of Silverlight applications into blogger






which was achieved by adding to my blogger html template:
<script type="text/javascript" src="http://www.figmentengine.com/assets/script/silverlight.js" ></script>

and then each time I want to embed Silverlight in a post, a holder for the control:
<div id="simplekineticsHost" style="text-align: center;"><object data="data:application/x-silverlight-2," type="application/x-silverlight-2"></object></div>

and some javascript to control the silverlight settings:
<script type="text/javascript">  var host = "http://www.figmentengine.com/";  var source = host + "silverlight/kinetics/simplekinetics.xap";  var parentElement = document.getElementById("simplekineticsHost");  var callbackId = "simplekineticsHost2";  var properties = { width: "500", height: "350", version: "2.0.31005.0"};  var events = {};  Silverlight.createObject(source, parentElement,   callbackId, properties, events);</script>

this was based on this article, with a minor update for the release of silverlight 2.