Thank you Umalo (very insightful code

), I've managed to make it work. The 16 pictures are consecutevily being called to give a 360 rotating effect.
Here is my code:
|
Source code
|
1
2
3
4
5
6
7
8
|
<hotspot name="vrobj" url="pictures/N1-1.jpg" width="50%" height="50%" ath="0" atv="0" distorted="true" index="1" lastindex="16" visible="true" zorder="1" onclick="animate();" />
<action name="animate">
inc(index,1,get(lastindex),1); txtadd(urll,'pictures/N1-',get(index),'.jpg'); set(hotspot[vrobj].url,get(urll)); showlog(); trace('url1 is at: ', get(urll)); delayedcall(0.1, animate_right() );
</action>
<hotspot name="vrobj_right" url="pictures/N1-2.jpg" width="50%" height="50%" ath="0" atv="0" distorted="true" visible="true" zorder="0" />
<action name="animate_right">
inc(index,1,get(lastindex),1); txtadd(urlll,'pictures/N1-',get(index),'.jpg'); set(hotspot[vrobj_right].url,get(urlll)); showlog(); trace('url1 is at: ', get(urll)); delayedcall(0.1, animate() );
</action>
|
One teeeny tiny issue is that for some odd reason the sequence going from 4->4->5->5->6->6->7->7....
I mean it's almost unnoticeable but irritating the OCD within me.