wrapping js in function

  • I just bought and set up this html5 pano viewer. Loading panos onload
    of the browser does not suit my needs. I need it to launch based on a
    javascript event (click). So I took the demo, wrapped the js in a
    function and hooked up a link to that function, so I could trigger it
    with the click. Well that doesn't work for me. This is what I did at
    the end of the file:



    VERY simple! Anyway, you can view it in action here:

    http://archive.cyark.org/iphone/krpano_html5only.html

    What's wrong? Why isn't this working for me? I just need to wrap the calls in a function, and then hook up that function to some other js event. Any help would be greatly appreciated.

  • Can somebody please help me or point me to a tutorial that does what I am requesting? Basically, I want a list of links where each one launches a different pano. I know there is navigation abilities within the xml spec, but I need to use javascript. And I can't use a page reload. Any thoughts?

  • Hi,

    you would need the latest 1.0.8.14 pre-release from here:
    https://krpano.com/download/beta/#2011-04-04

    and you would need to use instead of the swfkrpano.js file a .js file with the krpanoiphone license embedded (e.g. generated by the MAKE PANO droplets),

    or to include all .js files manually in the html file in the that order:

    Code
    <script src="swfkrpano.js"></script>
    <script src="krpanoiphone.license.js"></script>
    <script src="krpanoiphone.js"></script>

    then the dynamic embedded will work,
    have also a look into the "iphone-ipad-simulator.html" from the pre-release package,

    best regards,
    Klaus

Participate now!

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