Hi,
These forums are very helpful. I believe, I have never been stuck on a krpano project and not found an answer here. Krpano itself is a genius piece of software and with the best help in this forum.
My question today is I have a sprite sheet that I am animating on a hotspot, which works fine:
Code
<style name="w_style"
url="skin/asst1b.png"
crop="0|0|77|153"
frames="7" framewidth="77" frameheight="153" frame="1" loopNo="19" loopCount="0"
column="1" columns="7" columnframenr="1"
onloaded=""
altonloaded="if(isphone, mul(scale,2)); onloaded();"
scale="1.5"
edge=""
oy="0"
onclick="w_animate();"
distorted="true"
/>
<action name="w_animate">
inc(frame,1,get(frames),1);
mul(t, column, columnframenr);
add(t,1);
if(frame == t, inc(column,1));
sub(xp, column,1);
mul(xp, framewidth);
mul(yp,frame,frameheight);
mul(ch, columnframenr, frameheight);
sub(cm, column,1);
sub(q,columns,1);
mul(ce, ch,cm);
if(cm==q, set(column, 1));
if(yp GT ch, sub(yp, ce));
sub(yp, frameheight);
txtadd(crop, get(xp),'|',get(yp),'|',get(framewidth),'|',get(frameheight));
if(loopCount LE loopNo, inc(loopCount, 1); delayedcall(0.08, w_animate() ); , set(loopCount, 0); );
</action>
Alles anzeigen
Now when I am calling the hotspot in a scene it works fine too.
Code
<scene name="" title="" onstart="" thumburl="" lat="" lng="" heading="">
.
. . .
<hotspot name="asst_cursor"
style="w_style"
ath="61.016" atv="-5.7"
enabled="true"
onclick="w_animate();"
/>
But what I want is to call the animation on that hotspot after clicking on another hotspot and I cannot get my head around how to do that ...
This part below is the problem:
Code
<hotspot name="spotOpt1" url="skin/buttons_yellow.png" distorted="true" scale="0.25" enabled="true" ath="45.382" atv="-0.911"
onclick="set(hotspot[asst_cursor].w_animate(); );" />
Thanks,
DarManiac