Hi,
the 'hotspot_animate' action loops itself by call itself by a delayedcall,
see here:
|
Source code
|
1
|
delayedcall(0.1, hotspot_animate() );
|
to be able to stop that process you can define an additionally custom variable and check for this variable before doing the delayedcall,
e.g.
|
Source code
|
1
|
if(anistopped == false, delayedcall(0.1, hotspot_animate() );)
|
and add - anistopped="false" - to the <plugin> definition of the hotspot,
for stopping the animation just set:
|
Source code
|
1
|
set(hotspot[spotname].anistopped,true);
|
when it should be started again - from an action from another hotspot or plugin element, then the 'hotspot_animate' needs first to be rewritten to use 'absolute variable paths',
e.g.
|
Source code
|
1
2
3
4
5
6
|
<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));
delayedcall(0.1, hotspot_animate(%1) );
</action>
|
and then the 'hotspot_animate' action must be called with the name of the hotspot that should be animated,
e.g.
to start the animation:
|
Source code
|
1
2
|
set(hotspot[spotname].anistopped, false);
hotspot_animate(spotname);
|
best regards,
Klaus