loadpano doesnt work after look tohotspot

  • Hi,

    just a quick question. whats wrong with this line?

    Code
    looktohotspot(previous-arrow,30,smooth(150,25,100));loadpano(panorama-42.xml);

    I'm using it in an onclick of a image arrow hotspot

    Code
    <hotspot name="previous-arrow" alpha="0" blendmode="add" url="%SWFPATH%/images/arrow.png" keep="false" ath="-111" atv="7" zoom="true" scale="1" visible="true" enabled="true" handcursor="true" capture="true" children="true" zorder="0" alpha="1.00" blendmode="normal" smoothing="true" onloaded="tween(scale,0.8)" onover="tween(scale,1.2);" onhover="" onout="tween(scale,0.8);" ondown="" onup="" onclick="looktohotspot(previous-arrow,30,smooth(150,25,100));loadpano(panorama-42.xml);"
    />


    what happends is it just goes blank. If I remove lootohotspot. it works.

    Code
    onclick="loadpano(panorama-42.xml);"


    But I need it to zoom in the arrow before loading the next xml. Whats the correct way of doing this? I would normally just use one xml with many scenes but I have hundreds of panoramas to connect so I'm using xmls for each panorama. Help me please!!!!

    Thanks,
    Milo

  • Milo,
    I copied your hotspot exactly as you listed it here and I changed only the url path to my image and the xml name to fit my setup and your hotspot code worked perfectly. Can you provide a link to the error?

    Jarred

  • It works? hmm.

    Here's my xml. the next and previous xml looks the same except for the location of the tiles

    Code
    <krpano version="1.0.8" onstart="action(onstart);"><action name="onstart">js(moveMarkerTo(11.9566766679487,121.9273853302002));loadscene(scene-1, null, MERGE);</action>
    
    
    <scene name="scene-1"><view hlookat="0" vlookat="0" maxpixelzoom="1.0" fov="90" fovmin="20" fovmax="90" fisheye="0.3" /><display details="22" />
    <preview type="CUBESTRIP" url="panorama-66.tiles/preview.jpg" /><image type="CUBE" multires="true" tilesize="955"><level tiledimagewidth="1910" tiledimageheight="1910"><left  url="panorama-66.tiles/l2_l_%0v_%0h.jpg" /><front url="panorama-66.tiles/l2_f_%0v_%0h.jpg" /><right url="panorama-66.tiles/l2_r_%0v_%0h.jpg" /><back  url="panorama-66.tiles/l2_b_%0v_%0h.jpg" /><up    url="panorama-66.tiles/l2_u_%0v_%0h.jpg" /><down  url="panorama-66.tiles/l2_d_%0v_%0h.jpg" /></level><level tiledimagewidth="955" tiledimageheight="955"><left  url="panorama-66.tiles/l1_l_%0v_%0h.jpg" /><front url="panorama-66.tiles/l1_f_%0v_%0h.jpg" /><right url="panorama-66.tiles/l1_r_%0v_%0h.jpg" /><back  url="panorama-66.tiles/l1_b_%0v_%0h.jpg" /><up    url="panorama-66.tiles/l1_u_%0v_%0h.jpg" /><down  url="panorama-66.tiles/l1_d_%0v_%0h.jpg" /></level></image><hotspot name="previous-arrow" alpha="0" blendmode="add" url="%SWFPATH%/images/arrow.png" keep="false" ath="-55" atv="5" zoom="true" scale="1" visible="true" enabled="true" handcursor="true" capture="true" children="true" zorder="0" alpha="1.00" blendmode="normal" smoothing="true" onloaded="tween(scale,0.8)" onover="tween(scale,1.2);" onhover="" onout="tween(scale,0.8);" ondown="" onup="" onclick="looktohotspot(previous-arrow,30,smooth(150,25,100));loadpano(panorama-65.xml)"
    /> <hotspot name="next-arrow" alpha="0" blendmode="add" url="%SWFPATH%/images/arrow.png" keep="false"  ath="117" atv="6"  zoom="true" scale="1" visible="true" enabled="true" handcursor="true" capture="true" children="true" zorder="0" alpha="1.00" blendmode="normal" smoothing="true" onloaded="tween(scale,0.8)" onover="tween(scale,1.2);" onhover="" onout="tween(scale,0.8);" ondown="" onup="" onclick="looktohotspot(next-arrow,30,smooth(150,25,100));loadpano(panorama-67.xml)"
    /> </scene></krpano>


    The moveMarkerTo is just a function that moves a google map marker to the lat long specified in the arguments. I thought the problem might be on that line but even if i remove that it still wont load the scene. its just black and there are no errors. Any ideas? Like i said if i remove the looktohotspot before loadpano it works fine.

    Thanks,
    Milo

Jetzt mitmachen!

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