Animated hotspot not functioning correctly

  • Is it not possible to have one (static) hotspot cause a second hotspot (animated) to animate when using "onover"?

    If I use the animated hotspot alone then there is no problem, but as soon as I try and link the two many problems start occuring -- e.g. the static hotspot becomes a colored rectangle, the animated hotspot doesn't animate and I can no longer interact with any other hotspots in the scene, having to then exit the tour.

    If I try tweeking some of the settings, I can finally get the animation to work properly but a new problem occurs when I click the (combined) hotspot in that the next scene becomes broken and cannot interact with hotspots, plugins, etc having to again quit the tour.

    Independently, each hotspot works as intended but together they do not work.

    I have checked the forums and tried all the posted solutions to no avail, but the posts suggest that linking a static and animated hotpot is possible.

    Here's what works to make the hotspot animate correctly but breaks the next scene when clicked:

    krpano version="1.16"


    <action name="hotspot_animate">

    inc(hotspot[%1].frame,1,get(hotspot[%1].lastframe),0);

    mul(ypos,hotspot[%1].frame,hotspot[%1].frameheight);

    txtadd(hotspot[%1].crop,'0|',get(ypos),'|',get(hotspot[%1].framewidth),'|',get(hotspot[%1].frameheight));

    ifnot(hotspot[%1].anistopped, delayedcall(0.01, hotspot_animate(%1) ););

    </action>


    <hotspot name="hs1" url="hotspots/MPlookright.png"

    ath="123.310112" atv="-1.660096" distorted="true" rx="0" ry="0" rz="-1.400284" width="607" height="942" scale="0.039267"

    onloaded="tween(alpha,0.0)"

    onover="tween(hotspot[hs1].alpha, 1.0, 0.6);tween(hotspot[hs2].alpha,1.0, 0.6);set(hotspot[hs2].anistopped,false);hotspot_animate(hs2);"

    onout="tween(hotspot[hs1].alpha, 0, 0.6);tween(hotspot[hs2].alpha,0, 0.6);set(hotspot[hs2].anistopped,true);"

    onclick="loadscene(scene_1904_v1,null,MERGE,BLEND(3));" />


    <hotspot name="hs2" url="hotspots/PointRight.png" crop="0|0|438|250" framewidth="438" frameheight="250" frame="0" lastframe="21" rx="0" ry="0" rz="0" scale="0.043743"

    distorted="true" anistopped="false" enabled="false" ath="126.650416" atv="-1.0" alpha="0.0"

    onloaded="tween(alpha,0.0)"/>


    Thanks for the help.

  • Thanks for the response but problem solved. I was going crazy.

    For other beginners' information...

    Finally (after several frustrating nights) I discovered that the names of the hotspots was the problem. Apparently the hotspot_animate action is very particular about names when coupled with another hotspot. This particular tour has about 30 scenes and I had been testing (static) hotspots in various scenes over time, and I just labeled them the same in each scene (hs1, hs2, etc.) because there had never been any problem when I clicked on them. So when the animated hotspot I was testing kept failing, I finally used the editor's xml (which I never use) and discovered the hotpot_animate action showed up in the scenes with static hotpots even though I hadn't put it there -- and these had been cropped even though they were single images (eg - crop="0|NaN|NaN|NaN") and some other wierd problems. Tried renaming the animated hotspot and all problems went away.

    Probably very basic, but...

    Just to let other beginners like me know.

    Really appreciate the response -- if I hadn't stumbled upon looking more closely at the editor's xml I would have been really stuck.

    I guess I should add that this is for flash and PC use only within our family so I don't know how I could have posted any links... I suppose I could have made up a simulated tour and embedded the problem into but there's no need for that now.

    Thanks again.

Participate now!

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