• Does anyone have any idea why a hotspot would function only once on an iphone?
    I have three hotspots in a tour, each opening an information panel and they all function correctly on the desktop. However, on the iphone (3 & 4), after any of them are actioned, it, and both of the other hotspots, do not work.
    Here's the tour:

    This is the relevant section of the xml:

    <style name="info_spot"
    frames="19" framewidth="64" frameheight="64" frame="0"
    altonloaded="if(isphone, mul(scale,2)); onloaded();"

    <hotspot name="spot1" style="info_spot" ath="139" atv="6.75" onhover="showtext(Clique para más información, buttonstyle);"
    onclick="lookto(138,7,85,smooth(150,30,40)); if(plugin[image].visible,closeimage()); showImage(files/graphics/windows.png);rotOff()" />
    <hotspot name="spot2" style="info_spot" ath="208" atv="18.65" onhover="showtext(Clique para más información, buttonstyle);"
    onclick="lookto(208,20,80,smooth(150,30,40)); if(plugin[image].visible,closeimage()); showImage(files/graphics/sound.png);rotOff()" />
    <hotspot name="spot3" style="info_spot" ath="-80" atv="-8.75" onhover="showtext(Clique para más información, buttonstyle);"
    onclick="lookto(-80,-6,80,smooth(150,30,40)); if(plugin[image].visible,closeimage()); showImage(files/graphics/safety.png);rotOff()" />

    <plugin name="image" url=""
    alpha="0" keep="true" align="center" onclick="closeimage()" />

    <action name="showimage">

    <action name="closeimage">
    tween(plugin[image].alpha, 0,,,
    tween(view.fov, 95,0.7,,

    Here's the full xml:


  • Thanks for your input sacha.

    The typo, although a stupid oversight on my part, makes no difference to the actions and neither does changing the toggle. In fact, the toggle is only there because I copied and pasted the code from another tour and didn't go through it properly... hence the typo. Even without the toggle, everthing works fine on the desktop.

    I have investigated a little further and narrowed it down to this:

    <action name="closeimage">


    On the desktop, this action works fine. On the iphone it stops after " tween(view.fov,95,0.7); " which means the image is still there, though not visible, and blocking any further attempts to touch another hotspot.

    I know there is nothing wrong with the structure of the action because I can substitute set(plugin[image].url,); for set(plugin[image].visible,false,); and it works fine.
    Of course, this is a workaround for my problem but, I'm intrigued to know why
    set(plugin[image].url,%1); works, but set(plugin[image].url,); doesn't. *confused*

  • there are some bugs in the iphone JS where if there is a blank textfield or blank url it crashes. try "null" instead if just leaving it blank. otherwise create a 100% transparent image and use that as the dummy image. when the dummy image is visible make krpano think it is not.

  • Sacha

    Another question would be why are you clearing out the url in the first place? I see no point in doing it.

    Well, I have to do something with it otherwise, as I said before, it blocks any further attempts to touch another hotspot and, as I'm new to this coding, I don't know any other way than set(....url,); , set(....scale,0); or set....visible,false);

    I tried set(....url,null); but this didn't solve the problem either.
    I say 'problem' but it actually isn't anymore as I can use set(....visible,false); so I'll think I'll stick with that for now and concentrate on sorting out bigger issues. *thumbup*

    Thanks for your input.

Participate now!

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