onviewchange keeps firing when not moving

  • Hey guys I have onviewchange event that keeps firing off and doesn't stop when I'm not moving, any ideas?

    thanks

    Code
    <events onviewchange="onViewChange()" /> 
    <action name="onViewChange">trace("On view change");</action>
  • So in my little demo I'm making so I can learn krpano I'm using Adobe Edge and embedding krpano with a iframe and I've combined the video interface and animated hotspots examples into my demo. I've isolated the problem and when I remove url in the <sphere>

    Code
    <image devices="panovideosupport">		<sphere url="plugin:video" />	</image>


    the constant firing of onviewchange stops. Very strange. Anyone run into similar problems?

  • Hi,

    the onviewchange fires on every redraw.

    To track certain view changes it would be necessary to check for changes of that values,
    e.g. this way:

    Code
    <events onviewchange="test();" />
    
    
    <action name="test">
      if(view.hlookat != last_view_hlookat OR view.vlookat != last_view_vlookat,
      	copy(last_view_hlookat, view.hlookat);
      	copy(last_view_vlookat, view.vlookat);
      	... do something ...
       );
    </action>

    Best regards,
    Klaus

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!