I developed a game using Silverlight 2 (beta 2) and have been playtesting it on my website, using the test html page generated for me from the silverlight solution's web project. I just upgraded to the released version of Silverlight 2 (including the dev
tools of course), rebuilt my app without problems, then knew I needed to update my html page to include the correct link to Microsoft's released Silverlight version (rather than the link to the beta 2 version of the SL runtime).
So to get the new link, I just created a new Silverlight 2 solution in Visual Studio, then opened the generated html page, pulled out the correct link to the released runtime version, and pasted that into my existing page over the old beta 2 link.
However, I noticed that in the new solution there was a Silverlight.js file created and the new html page referenced it:
Silverlight.js ships with the SDK and has some client side scripting so you can detect whether or not your user has Silverlight installed and dynamically write the object tag or the install symbol.
You can alternatively just write out the object tag, or if you're using aspx, you can use the asp:Silverlight control
------------------------------------
If this post has solved your problem, please select ‘Mark as answer’
Program Manager | Silverlight Tools for Visual Studio | Microsoft Visual Web Developer | www.dullard.net
<p class="style2">Ooh, you are almost ready to repel the alien invaders, all you need is Microsoft's Silverlight plugin; click the image below to get it</p>
<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> <p class="style2">Here's a screenshot from the game:</p> <img src="mtnscreen.JPG" alt="Mountain Pass Tower Defense screenshot"/> </object>
It used to be important, one reason was because in IE unless you used javascript to write the object tag you would get the "click to activate" stuff. Microsoft settled this patent issue and a patch went out for IE7 to remove this. There are some cool things
in it to refresh the page on install automatically but I think some of this may have been wrapped into the asp:Silverlight control.
So overall, I'd say most people won't need to use Silverlight.js
dsr9996
Member
11 Points
3 Posts
Do I need Silverlight.js file?
Oct 15, 2008 07:07 PM | LINK
Hi silverlight devs,
I developed a game using Silverlight 2 (beta 2) and have been playtesting it on my website, using the test html page generated for me from the silverlight solution's web project. I just upgraded to the released version of Silverlight 2 (including the dev tools of course), rebuilt my app without problems, then knew I needed to update my html page to include the correct link to Microsoft's released Silverlight version (rather than the link to the beta 2 version of the SL runtime).
So to get the new link, I just created a new Silverlight 2 solution in Visual Studio, then opened the generated html page, pulled out the correct link to the released runtime version, and pasted that into my existing page over the old beta 2 link.
However, I noticed that in the new solution there was a Silverlight.js file created and the new html page referenced it:
<script type="text/javascript" src="Silverlight.js"></script>
My existing html page didn't reference this file (nor did I copy it to my server). Do I need to?
I haven't run into any problems but are people who come to my site without silverlight going to have problems? Help!
amyd
Member
722 Points
124 Posts
Re: Do I need Silverlight.js file?
Oct 15, 2008 07:23 PM | LINK
Silverlight.js ships with the SDK and has some client side scripting so you can detect whether or not your user has Silverlight installed and dynamically write the object tag or the install symbol.
You can alternatively just write out the object tag, or if you're using aspx, you can use the asp:Silverlight control
If this post has solved your problem, please select ‘Mark as answer’
Program Manager | Silverlight Tools for Visual Studio | Microsoft Visual Web Developer | www.dullard.net
dsr9996
Member
11 Points
3 Posts
Re: Do I need Silverlight.js file?
Oct 15, 2008 07:29 PM | LINK
Thanks for your reply. I think I understand what you are saying, and I think I am using the "object" tags. Here is the snippet from my html page:
Is this what you mean by using the object tag?
Thanks!
Bill Reiss
Contributor
4973 Points
947 Posts
Re: Do I need Silverlight.js file?
Oct 15, 2008 07:32 PM | LINK
It used to be important, one reason was because in IE unless you used javascript to write the object tag you would get the "click to activate" stuff. Microsoft settled this patent issue and a patch went out for IE7 to remove this. There are some cool things in it to refresh the page on install automatically but I think some of this may have been wrapped into the asp:Silverlight control.
So overall, I'd say most people won't need to use Silverlight.js
Bill Reiss, Coauthor of Hello! Silverlight
My blog
amyd
Member
722 Points
124 Posts
Re: Do I need Silverlight.js file?
Oct 15, 2008 07:34 PM | LINK
Yep
If this post has solved your problem, please select ‘Mark as answer’
Program Manager | Silverlight Tools for Visual Studio | Microsoft Visual Web Developer | www.dullard.net