I'm considering the possibility of using Krpano for a project that is following my Studio. I then downloaded krpano Viewer 1.0.8.11 to run tests. In particular I need to execute some JavaScript functions from the OnMouseDown event but continues to give me the following error:
Javascript call "jstest(mouse.x)" failed;
What's wrong?
The three sample files are:
html file
HTML
<html>
<head>
<title>krpano.com - events example</title>
</head>
<script src="panoramica.js" type="text/javascript"></script>
<style>
body{ font-family:Arial, Helvetica, sans-serif; font-size:10px; color:#FFFFFF; background-color:#000000; margin:0; padding:0; }
* html, * html body{ overflow: hidden; }
a{ color:#AAAAAA; text-decoration:underline; }
a:hover{ color:#FFFFFF; text-decoration:underline; }
</style>
<body >
<div id="krpanoDIV">
<noscript><table width="100%" height="100%"><tr valign="middle"><td><center>ERROR:<br><br>Javascript not activated<br><br></center></td></tr></table></noscript>
</div>
<script type="text/javascript" src="../../swfkrpano.js"></script>
<script type="text/javascript">
// <![CDATA[
var swf = createswf("../../krpano.swf", "krpanoSWFObject", "100%", "100%");
swf.addVariable("xml", "events.xml");
swf.embed("krpanoDIV");
// ]]>
</script>
</body>
</html>
Alles anzeigen
xml file
Code
<krpano version="1.0.8">
<!-- text style for onviewchange event text -->
<textstyle name="onviewchange_textstyle"
origin="leftbottom" edge="leftbottom" xoffset="5" yoffset="150" textalign="left" background="false" border="false"
fontsize="20" textcolor="0xFFFFFF" bold="false" effect="glow(0xFFFFFF,0.7,2,2);glow(0x000000,1,2,2);dropshadow(3,45,0x000000,1,0.3);"
showtime="0"
/>
<!-- preview + pano -->
<preview url="pano.jpg" />
<image type="CUBESTRIP">
<cubestrip url="pano.jpg" />
</image>
<!-- view settings -->
<view hlookat="0" vlookat="0" fovtype="MFOV" fov="90" fovmin="60" fovmax="120" />
<events onxmlcomplete="showlog(); trace('esempio di eventi');"
onmousedown="js( jstest(mouse.x) );"
/>
</krpano>
Alles anzeigen
panoramica.js file
Thanks for the help