swfkrpanomousewheel.js and aspx Microsoft .NET pages

  • I am using krpano 1.0.8 beta9 with aspx pages developed with Microsoft VWD 2008, but I am unable to fix the scroll/zoom issue with swfkrpanomousewheel.js


    I tested the code of swfobject21.html example available in the swf-to-html-embedding folder and:


    - the scroll/zoom issue is properly fixed using the code in html page,

    - the scroll/zoom issue is not fixed when the same code in moved in an aspx page.


    Any idea how to fix mousewheel issue in aspx?


    Thanks

  • Here below the html generated from my swfobject21.aspx page (derived from swfobject21.html example) and, following, the original swfobject21.html page.
    The only elements inserted serverside that I can see are the form tag and the hidden input tag containing the page Viewstate (no way to avoid this in ASP.NET).
    I don't understand how these 2 elements can affect the functioning of the page but this is what is happenning: swfobject21.html works, swfobject21.html doesn't.

    Thanks
    Marco

    ----------------------------- html generated by swfobject21.aspx : -------------------------------------------------------------------------------------------------

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title></title>
    <script type="text/javascript" src="swfobject21/swfobject.js"></script>
    <script type="text/javascript" src="swfobject21/swfkrpanomousewheel.js"></script>
    <script type="text/javascript">
    // <![CDATA[
    if (swfobject.hasFlashPlayerVersion("6.0.0")){
    swfobject.embedSWF("krpano.swf","krpanoDIV","200","200","9.0.28","swfobject21/expressinstall.swf",
    { pano: "pano.xml", license: "krpanoLicense.xml"},
    { allowfullscreen: true, bgcolor: "#000000"},
    { id: 'krpanoSWFObject1', name: 'krpanoSWFObject' });
    swfkrpanomousewheel.registerObject("krpanoSWFObject");
    }
    else {
    document.getElementById("krpanoDIV").innerHTML = '<table width="100%" height="100%"><tr valign="middle"><td><center>ERROR:<br/><br/>Adobe Flash Player needed<br/><br/><br/><a href="http://www.adobe.com/go/getflashplayer/" target="_blank"><IMG SRC="http://www.macromedia.com/images/shared/…lash_player.gif" BORDER="1"></a><br/>...click here to download...<br/><br/><br/><br/></center></td></tr></table>';
    }
    // ]]>
    </script>
    </head>
    <body>
    <form name="form1" method="post" action="swfobject21_nomaster.aspx" id="form1">
    <div>
    <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTE2MTY2ODcyMjlkZAVTuCGyJ4QeblN09y5TmUuRr+dQ" />
    </div>
    <div id="krpanoDIV">
    <noscript>ERROR:<br/><br/>Javascript not activated<br/><br/></noscript>
    </div>
    </form>
    </body>
    </html>


    ----------------------------- original swfobject21.html : -------------------------------------------------------------------------------------------------

    <html>
    <head>
    <title></title>
    <script type="text/javascript" src="swfobject21/swfobject.js"></script>
    <script type="text/javascript" src="swfobject21/swfkrpanomousewheel.js"></script>
    <script type="text/javascript">
    // <![CDATA[
    if (swfobject.hasFlashPlayerVersion("6.0.0")) {
    swfobject.embedSWF("krpano.swf", "krpanoDIV", "200", "200", "9.0.28", "swfobject21/expressinstall.swf",
    { pano: "pano.xml", license: "krpanoLicense.xml" },
    { allowfullscreen: true, bgcolor: "#000000" },
    { id: 'krpanoSWFObject1', name: 'krpanoSWFObject' });
    swfkrpanomousewheel.registerObject("krpanoSWFObject");
    }
    else {
    document.getElementById("krpanoDIV").innerHTML = '<table width="100%" height="100%"><tr valign="middle"><td><center>ERROR:<br/><br/>Adobe Flash Player needed<br/><br/><br/><a href="http://www.adobe.com/go/getflashplayer/" target="_blank"><IMG SRC="http://www.macromedia.com/images/shared/…lash_player.gif" BORDER="1"></a><br/>...click here to download...<br/><br/><br/><br/></center></td></tr></table>';
    }
    // ]]>
    </script>
    </head>
    <body>
    <div id="krpanoDIV">
    <noscript>ERROR:<br/><br/>Javascript not activated<br/><br/></noscript>
    </div>
    </body>
    </html>

  • Hi,

    I can't say for sure, maybe a doctype problem with the swfobject.js,
    try using the newer swfobject.js from swfobject 2.2 ,

    btw - in the next krpano version there will be an new and much updated swfkrpanomousewheel.js,
    there I also use swfobject 2.2, because the 2.1 script seems to have some problems in the IE8,

    best regards,
    Klaus

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!