Invalid type: SlideViewer

Jun 23, 2008 at 12:29 AM
Edited Jun 28, 2008 at 10:43 AM

I have made several attempts at getting this to work and although the video tutorial was very helpful, I can't seem to shake the following error:

Microsoft JScript runtime error: Invalid type: SlideViewer

That is thown in the getTypeFromConfig function. I would appreciate any thoughts on how best to address.

Regards,

Whitmark

Technologies
-------------------------------
Visual Studio 2008 Beta 1
Silverlight 2.0 Beta 2
SlideShow 1.1
Expression Blend 2.5 June Preview (installed but not used in this solution)

Solution Explorer
-------------------------------
- > > WebSite3
- - slideshow
- - - a03.jpg
- - - s01.jpg
- - - s02.jpg
- - - s03.jpg
- - - s04.jpg
- - - configuration.xml
- - - data.xml
- - - Silverlight.js
- - - SlideShow.js
- - Default.htm
- - Web.config

Default.htm
-------------------------------

 

<html xmlns="http://www.w3.org/1999/xhtml"> 
<
html
<
head
    <title>Slide.Show</title
    <script type="text/javascript" src="slideshow/Silverlight.js"></script
    <script type="text/javascript" src="slideshow/SlideShow.js"></script>
</head>
<body
    <script type="text/javascript"> 
        new SlideShow.Control(new SlideShow.XmlConfigProvider({ url: "slideshow/configuration.xml" })); 
    </script>
</body>
</
html

slideshow/configuration.xml
-------------------------------
<configuration width="600" height="400" background="Silver"
    <
modules
        <
module type="SlideViewer"
            <
option name="bottom" value="0" /> 
        </
module
        <
module type="ProgressBar" /> 
        <
module type="SlideDescription" /> 
        <
module type="NavigationTray"
            <o
ption name="thumbnailViewer.left" value="83" /> 
        </
module
    </
modules
    <t
ransitions
        <
transition type="FadeTransition" name="CrossFadeTransition" /> 
        <
transition type="WipeTransition" name="WipeRightTransition"
            <
option name="direction" value="Right" /> 
        </
transition
    </
transitions
    <
dataProvider type="XmlDataProvider"
            <
option name="url" value="slideshow/data.xml" /> 
        </
dataProvider>
</
configuration>

 

 slideshow/data.xml
-------------------------------

 

 <data transition="CrossFadeTransition"
<
album title ="Cool Pictures"
<
slide image="slideshow/images/s01.jpg" /> 
<sl
ide image="slideshow/images/s02.jpg" /> 
<
slide image="slideshow/images/s03.jpg" />
<
slide image="slideshow/images/s04.jpg" />
</a
lbum>
</
data>

 

SlideShow.js (Header and Abending Function Only)
-------------------------------

 

// Slide.Show, version 1.1
// Copyright © Vertigo Software, Inc.
// This source is subject to the Microsoft Public License (Ms-PL).
// See http://www.microsoft.com/resources/sharedsource/licensingbasics/publiclicense.mspx.
// All other rights reserved.
/// <reference path="Silverlight.js" />
/*******************************************
 namespace: SlideShow
*******************************************/
if (!window.SlideShow) 
    window.SlideShow = {};

 

   . . .

getTypeFromConfig:  

function(config) 
{
    /// <summary>Gets the type from the specified configuration.</summary> 
    /// <param name="config">The configuration.</param> 
    /// <returns>The evaluated type.</returns> 

   var type = eval("SlideShow." + config.type); 
    if
(!type) throw new Error("Invalid type: " + config.type); 
    return type;
},

 

. . .

Jun 28, 2008 at 4:45 AM
Edited Jun 28, 2008 at 4:46 AM

I've removed the VS 2008 and Silverlight 2.0 editions in favor of VS 2005 and Silverlight 1.0 for testing and am still getting the same error.  Thoughts, anyone, on how to resolve?
Aug 3, 2008 at 3:22 PM
Looks like I copied the wrong SlideShow.js (53 KB) from the Debug folder vs using the SlideShow.js (195KB) from the Release folder into by web folder.  Got it working now and it works great.