Hi I am using this code, I wanted to achieve that the named hotspot would fly out automatically without clicking on it.
I still want to keep the click-ability of the hotspot.
After the pano is loaded it zoomes in to position according to the script, but the hotspot does not fly out. Where am I making the mistake?
Thanks for a reply.
<events onloadcomplete="delayedcall(1.0, normalview());" />
<action name="normalview">
tween(view.fov, 80, 11, easeInOutQuad);
tween(view.vlookat, 39, 11, easeInOutQuad);
set(hotspot[apartmany_czpic].flying, ...)
<style name="flyoutimage"
distorted="true"
alpha="0.0"
backup_rx="0"
backup_ry="0"
backup_rz="0"
backup_scale="0"
backup_zorder="0"
flying="0.0"
flystate="0"
onclick="if(flystate == 0, flyout_by_name(get(name)), flyback_by_name(get(name)) );"
/>
<action name="flyout_by_name">
<!-- make all other hotspots flying back -->
flyback_others();
<!--
for best control set 4 fly states:
0 = normal
1 = while flying out
2 = out
3 = while flying back
-->
<!-- save original position/rotation -->
if(hotspot[%1].flystate == 0,
copy(hotspot[%1].backup_rx, hotspot[%1].rx);
copy(hotspot[%1].backup_ry, hotspot[%1].ry);
copy(hotspot[%1].backup_rz, hotspot[%1].rz);
copy(hotspot[%1].backup_scale, hotspot[%1].scale);
copy(hotspot[%1].backup_zorder, hotspot[%1].zorder);
copy(hotspot[%1].backup_alpha, hotspot[%1].alpha);
);
<!-- set new state -->
set(hotspot[%1].flystate,1);
set(hotspot[%1].zorder,99);
set(hotspot[%1].alpha,1);
<!-- tween the rotations values to 0 for a flat screen view -->
tween(hotspot[%1].rx, 0);
tween(hotspot[%1].ry, 0);
tween(hotspot[%1].rz, 0);
tween(hotspot[%1].scale, 1);
tween(hotspot[%1].flying, 1.0, 1.0, default, set(hotspot[%1].flystate,2); );
</action>
<hotspot name="apartmany_czpic" style="flyoutimage"
url="images/apartmany_cz.jpg"
enabled="true"
zorder="2"
ath="-3.4116918836863306" atv="17.318784905827883"
scale="0.05"
rx="0" ry="0" rz="180"
onhover="showtext(Lipno Lake Resort., logostyll)"
onclick=""