Sie sind nicht angemeldet.

1

Dienstag, 5. April 2011, 12:43

WAIT doesn't seem to work in tween() action when called from javascript

Hello! In my pano tour I use hotspots to navigate. An action, similar to the 'transition'-action in the Kuchlerhaus-tour, is used:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
<action name="navigateByHotspot">
...
<!-- move the hotspot (arrow) to the destination position -->
tween(hotspot[%1].alpha, 0.0, 0.25, default);
tween(hotspot[%1].ath, get(destination_ath), 0.25, default);
tween(hotspot[%1].atv, get(destination_atv), 0.25, default, WAIT);
...
<!-- look at the hotspot position -->
looktohotspot(%1);
...
</action>


When this action is called from within the 'onclick'-attribute in the <hotspot>-tag, it works fine:

Quellcode

1
<hotspot name="navigation_2" style="hotspot_navigation_north" ath="151.5" atv="4.8" scale="0.25" onclick="navigateByHotspot(navigation_2, 2, 246.87, 0, 90)"/>

However, when I call this action from an external javascript, it only works partially. The WAIT doesn't seem to have any effect: the 'looktohotspot'-action is executed at the same time as the preceding 'tween'-actions.

Quellcode

1
2
var command = 'navigateByHotspot(navigation_2, 2, 246.87, 0, 90)';
$('pano1').call(command);


Am I doing something wrong or could this be a bug?

2

Dienstag, 5. April 2011, 13:59

Hi,

the code itself looks okay and normally a javascript call shouldn't have any effect to the wait...
do you have an online example where the problem can be seen?

best regards,
Klaus

3

Mittwoch, 13. April 2011, 16:53

Hello Klaus,

Firstly, sorry for the late reply.

Somehow, the problem has solved itself. I really have no idea what happened, but suddenly it worked again. Maybe a caching issue? Anyway, thanks for your feedback!

Bob

Ähnliche Themen