• Hello All,

    I've managed to link hotspots to files in the working folder or in our domain with no problem. Now I'm trying to link the hotpsots in my panos to an external URL. I thought this would be easy but for some reason I'm unable to perform this action. I've tried onclick="'openurl('http://apple.com',_blank);"as well as onclick="'geturl('http://apple.com',_blank);" I have also tried this in multiple browsers as well as online/offline.

    The only thing I can think of is either my code is wrong or there maybe needs to be some actionscript included with this call? I've included my XML file for review.
    I can also not get the gyro.js to work either. This is the first time I've had a problem with this plugin.

    Thanks in advance.


    <krpano version="1.0.8.14" logkey="false">

    <progress showload="auto" showwait="loopings()" />

    <events onnewpano=""
    onxmlcomplete=""
    onpreviewcomplete=""
    onloadcomplete=""
    onloaderror=""
    onremovepano=""
    onkeydown=""
    onkeyup=""
    onclick=""
    onmousedown=""
    onmouseup=""
    onmousewheel=""
    onidle=""
    onviewchange=""
    onviewchanged=""
    onresize=""
    onenterfullscreen=""
    onexitfullscreen=""
    />


    <preview type="cubestrip" url="hubtest3.tiles/preview.jpg" details="12" striporder="LFRBUD" />

    <image type="CUBE" hfov="360" vfov="180" multires="true" progressive="false" tilesize="489" multiresthreshold="0.025">
    <level tiledimagewidth="978" tiledimageheight="978">
    <left url="hubtest3.tiles/l_%0v_%0h.jpg" />
    <front url="hubtest3.tiles/f_%0v_%0h.jpg" />
    <right url="hubtest3.tiles/r_%0v_%0h.jpg" />
    <back url="hubtest3.tiles/b_%0v_%0h.jpg" />
    <up url="hubtest3.tiles/u_%0v_%0h.jpg" />
    <down url="hubtest3.tiles/d_%0v_%0h.jpg" />
    </level>
    </image>

    <view hlookat ="188.607450"
    vlookat ="3.566442"
    camroll ="0.000000"
    fovtype ="MFOV"
    fov ="117.408761"
    fovmin ="117.408761"
    fovmax ="120.000000"
    maxpixelzoom ="1.000000"
    limitfov ="true"
    fisheye ="0.00"
    fisheyefovlink="0.50"
    stereographic ="false"
    pannini ="false"
    architectural ="0.0"
    architecturalonlymiddle="false"
    limitview ="auto"
    hlookatmin ="NaN"
    hlookatmax ="NaN"
    vlookatmin ="NaN"
    vlookatmax ="NaN"
    />

    <control usercontrol ="all"
    mousetype ="moveto"
    zoomtocursor ="false"
    zoomoutcursor ="true"
    mouseaccelerate="1.00"
    mousespeed ="10.00"
    mousefriction ="0.80"
    headswing ="0.00"
    keybaccelerate ="0.50"
    keybspeed ="10.00"
    keybfriction ="0.90"
    keybinvert ="false"
    mousefovchange ="1.00"
    keybfovchange ="0.75"
    fovspeed ="3.00"
    fovfriction ="0.90"
    movetocursor ="none"
    cursorsize ="10.0"
    keycodesleft ="37"
    keycodesright ="39"
    keycodesup ="38"
    keycodesdown ="40"
    keycodesin ="16,65,107"
    keycodesout ="17,89,90,109"
    />

    <contextmenu fullscreen="true">
    <item name="n0" enabled="true" visible="true" separator="false"
    caption="Powered by SlopeViews"
    onclick=""
    />
    <item name="n1" enabled="true" visible="true" separator="false"
    caption="FULLSCREEN"
    onclick=""
    />
    </contextmenu>

    <autorotate enabled ="false"
    waittime="1.5"
    accel ="1"
    speed ="10"
    horizon ="0"
    tofov ="NaN"
    />

    <textstyle name="default" font="Times" fontsize="12" bold="true" italic="false"
    textcolor="0" background="true" backgroundcolor="16777215" border="true" bordercolor="0"
    alpha="1" blendmode="normal" effect=""
    origin="cursor" edge="bottom" textalign="none" xoffset="0" yoffset="-3" noclip="true" showtime="0.1" fadetime="0" fadeintime="0"
    />

    <action name="hotspot_animate">
    inc(frame,1,get(lastframe),0);
    mul(ypos,frame,frameheight);
    txtadd(crop,'0|',get(ypos),'|',get(framewidth),'|',get(frameheight));
    delayedcall(0.03, if(loaded, hotspot_animate() ) );
    </action>


    <style name="hotspot_ani_black" url="hotspot_ani_black_64x64x20.png" framewidth="64" onloaded="hotspot_animate();" crop="0|0|64|64" frameheight="64" frame="0" lastframe="19" />
    <style name="hotspot_ani_white" url="hotspot_ani_white_64x64x20.png" framewidth="64" onloaded="hotspot_animate();" crop="0|0|64|64" frameheight="64" frame="0" lastframe="19" />

    <plugin name="editor" url="%SWFPATH%/plugins/editor.swf" keep="true" />

    <plugin name="gyro" devices="all"
    url="plugins/gyro.js"
    keep="true" preload="false"
    visible="true" enabled="true" handcursor="true" capture="true" children="true" maskchildren="false" usecontentsize="false"
    zorder="0"
    alpha="1.00" autoalpha="false" blendmode="normal" effect="" smoothing="true" pixelhittest="false"
    align="" edge=""
    x="" y="" ox="" oy=""
    width="" height=""
    crop="" ondowncrop="" onovercrop=""
    scale="1" scale9grid="" scalechildren="false"
    rotate="0"
    parent=""
    mask=""
    onloaded=""
    onover=""
    onhover=""
    onout=""
    ondown=""
    onup=""
    onclick=""
    camroll="false"
    friction="0.5"
    pixelhittest="false"
    velastic="0"
    />


    <hotspot name="spot3" devices="all"
    url="hotspot_ani_white_64x64x20.png"
    keep="false"
    ath="257.3563675671202" atv="4.245050615071531"
    zoom="false" distorted="false" details="8" flying="0"
    width="64" height="64"
    scale="1" scale9grid="" scalechildren="false" rotate="0"
    rx="0" ry="0" rz="0"
    edge="center" ox="" oy=""
    crop="0|832|64|64" ondowncrop="" onovercrop=""
    visible="true" enabled="true" usecontentsize="false" handcursor="true" capture="true" children="true" maskchildren="false"
    zorder="0"
    alpha="1.00" autoalpha="false" blendmode="normal" effect="" smoothing="true" pixelhittest="false"
    refreshrate="auto"
    onloaded="hotspot_animate();"
    onover=""
    onhover="showtext(Apple Thunderbolt Display);"
    onout=""
    ondown=""
    onup=""
    onclick="showlog(); trace('hotspot ',get(name),' clicked');"
    frame="13"
    frameheight="64"
    framewidth="64"
    lastframe="19"
    />

    <hotspot name="spot2" devices="all"
    url="hotspot_ani_black_64x64x20.png"
    keep="false"
    ath="59.43960035840328" atv="-18.05609454798864"
    zoom="false" distorted="false" details="8" flying="0"
    width="64" height="64"
    scale="1" scale9grid="" scalechildren="false" rotate="0"
    rx="0" ry="0" rz="0"
    edge="center" ox="" oy=""
    crop="0|896|64|64" ondowncrop="" onovercrop=""
    visible="true" enabled="true" usecontentsize="false" handcursor="true" capture="true" children="true" maskchildren="false"
    zorder="0"
    alpha="1.00" autoalpha="false" blendmode="normal" effect="" smoothing="true" pixelhittest="false"
    refreshrate="auto"
    onloaded="hotspot_animate();"
    onover=""
    onhover="showtext(HUB Class Schedule);"
    onout=""
    ondown=""
    onup=""
    onclick="showlog(); trace('hotspot ',get(name),' clicked');"
    frame="14"
    frameheight="64"
    framewidth="64"
    lastframe="19"
    />

    <hotspot name="spot1" devices="all"
    url="hotspot_ani_white_64x64x20.png"
    keep="false"
    ath="186.86053190654786" atv="6.987368698884773"
    zoom="false" distorted="false" details="8" flying="0"
    width="64" height="64"
    scale="1" scale9grid="" scalechildren="false" rotate="0"
    rx="0" ry="0" rz="0"
    edge="center" ox="" oy=""
    crop="0|256|64|64" ondowncrop="" onovercrop=""
    visible="true" enabled="true" usecontentsize="false" handcursor="true" capture="true" children="true" maskchildren="false"
    zorder="0"
    alpha="1.00" autoalpha="false" blendmode="normal" effect="" smoothing="true" pixelhittest="false"
    refreshrate="auto"
    onloaded="hotspot_animate();"
    onover=""
    onhover="showtext(DODOcase);"
    onout=""
    ondown=""
    onup=""
    onclick="showlog(); trace('hotspot ',get(name),' clicked');"
    frame="4"
    frameheight="64"
    framewidth="64"
    lastframe="19"
    />

    <hotspot name="spot4" devices="all"
    url="hotspot_ani_white_64x64x20.png"
    keep="false"
    ath="10.395081793846245" atv="-1.4713883618324974"
    zoom="false" distorted="false" details="8" flying="0"
    width="64" height="64"
    scale="1" scale9grid="" scalechildren="false" rotate="0"
    rx="0" ry="0" rz="0"
    edge="center" ox="" oy=""
    crop="0|384|64|64" ondowncrop="" onovercrop=""
    visible="true" enabled="true" usecontentsize="false" handcursor="true" capture="true" children="true" maskchildren="false"
    zorder="0"
    alpha="1.00" autoalpha="false" blendmode="normal" effect="" smoothing="true" pixelhittest="false"
    refreshrate="auto"
    onloaded="hotspot_animate();"
    onover=""
    onhover="showtext(UrbanEars);"
    onout=""
    ondown=""
    onup=""
    plugin[name].onclick="'openurl('http://apple.com',_blank);"
    frame="6"
    frameheight="64"
    framewidth="64"
    lastframe="19"
    />

    <lensflareset name="default" url="%SWFPATH%/krpano_default_flares.jpg">
    <flare name="n0" pixsize="128" pixupos=" 0" pixvpos=" 0" color="0xffffef" pos="0.000" scale="0.100" />
    <flare name="n1" pixsize=" 64" pixupos="128" pixvpos="128" color="0x060606" pos="-0.100" scale="0.110" />
    <flare name="n2" pixsize=" 64" pixupos="192" pixvpos="128" color="0x555f64" pos="0.200" scale="0.020" />
    <flare name="n3" pixsize="128" pixupos=" 0" pixvpos="128" color="0x240a00" pos="0.300" scale="0.050" />
    <flare name="n4" pixsize=" 64" pixupos="192" pixvpos="128" color="0x144422" pos="0.400" scale="0.020" />
    <flare name="n5" pixsize=" 64" pixupos="128" pixvpos="192" color="0x143c40" pos="0.600" scale="0.050" />
    <flare name="n6" pixsize=" 64" pixupos="128" pixvpos="128" color="0x354500" pos="0.800" scale="0.012" />
    <flare name="n7" pixsize="128" pixupos=" 0" pixvpos="128" color="0x483925" pos="1.100" scale="0.050" />
    <flare name="n8" pixsize=" 64" pixupos="192" pixvpos="128" color="0x10303f" pos="1.500" scale="0.060" />
    <flare name="n9" pixsize="128" pixupos=" 0" pixvpos="128" color="0x665544" pos="1.700" scale="0.050" />
    </lensflareset>

    !-- include the options plugin for interactively playing with the view and display settings -->


    <!-- add a right-click context menu for changing the viewing settings -->
    <contextmenu>
    <item caption="FULLSCREEN" />
    </contextmenu>

    </krpano>

  • Klaus thanks for your help.

    That one slipped me, forgot to remove plugin[name].
    I did remove the text as you suggested and receive the following error AFTER I click on another hotspot:

    ERROR: download of "plugins/gyro.js" failed
    WARNING: unknown action: 'openurl
    INFO: hotspot spot2 clicked


    Confused...

  • Hi,

    right, there is first a double quote character (to begin the attribute value) and then a single quote character as first character and that single quote character is wrong (a bit difficult to see).

    Here marked red:
    "'openurl('http://apple.com',_blank);"
    WARNING: unknown action: 'openurl

    That character was interpreted as part of the action name and there is no action named 'openurl and so that warning.
    Just remove that wrong character too and it should work .

    Best regards,
    Klaus

Participate now!

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