Hi there.

I'm attempting to embed Silverlight via Front Page, and for some reason the Silverlight player won't work with the same code I've used on plain HTML documents.

Code I'm trying to embed is this:

    <div id="silverlightControlHost">
		<object data="data:application/x-silverlight," type="application/x-silverlight-2" width="100%" height="100%">
			<param name="source" value="http://users.tpg.com.au/mjenke/PurePlayer2.xap"/>
			<param name="onerror" value="onSilverlightError" />
			<param name="background" value="white" />
			<param name="minRuntimeVersion" value="2.0.31005.0" />

			<param name="autoUpgrade" value="true" />
			<a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;">
     			<img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/>
			</a>
		</object>
		<iframe style='visibility:hidden;height:0;width:0;border:0px'></iframe>
    </div>

I've got the necessary JS in the head of every page by modifying the page.tpl.php file, but this has me stuffed. Any ideas?

Thanks!

Comments

Vc Developer’s picture

Hello out there, I need the same help. Anybody successfully using silverlight?

aquaseal’s picture

I have silverlight applications embedded on my blog, here is the code I use (this is from a silverlight 2 example, not the current SL3 version):

<div style="width: 325px; height: 350px;">
<object data="data:application/x-silverlight," type="application/x-silverlight-2" width="100%" height="100%">
<param name="source" value="/SLApps/DrupalGameDemo.xap" />
<a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;">
<img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none" />
</a></object></div>

when I create a new SL3 example the below code is what is generated:

<div id="silverlightControlHost">
<object data="data:application/x-silverlight," type="application/x-silverlight-2" width="100%" height="100%">
			<param name="source" value="SL3_Test.xap"/>
			<param name="onerror" value="onSilverlightError" />
			<param name="background" value="white" />
			<param name="minRuntimeVersion" value="3.0.40624.0" />
			<param name="autoUpgrade" value="true" />
			<a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=3.0.40624.0" style="text-decoration: none;">
     			<img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/>
			</a>
</object><iframe id='_sl_historyFrame' style='visibility:hidden;height:0;width:0;border:0px'></iframe></div>

Make sure the 'Input Format' is Full HTML and the correct MIME type is setup on the server (.xap -> application/x-silverlight-app):
http://blogs.msdn.com/tims/archive/2008/03/18/configuring-a-web-server-to-host-silverlight-content.aspx

you can see my silverlight examples on my webpage:
http://www.mattserbinski.com

Vc Developer’s picture

Thanks! I will give it a try and get back with you!

dublin drupaller’s picture

Status: Active » Closed (fixed)