You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Sunday, February 11th 2018, 4:42am

hotspot onout event and tooltip onout event

Here is my question:
I create a hotspot and I want to add "onout" event to it.

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
<hotspot
	name="spot_a"
	style="'hotspot_circle'|tooltip"
	ath="180"
	atv="0"
	scale="0.40"
	keep="true"
	tooltip="pano 13"
	onup="js(getHotspot(get(name),onup))"
	onhover="js(getHotspot(get(name),onhover))"
	onout="js(getHotspot(get(name),onout))"
>
</hotspot>

and then I set tooltip style like this:

Source code

1
2
3
4
5
6
7
<style name="tooltip"
	onover="copy(layer[tooltip].html, tooltip);
	set(layer[tooltip].visible, true);
	tween(layer[tooltip].alpha, 1.0, 0.5);
	asyncloop(hovering, copy(layer[tooltip].x,mouse.stagex); copy(layer[tooltip].y,mouse.stagey); );"
	onout="tween(layer[tooltip].alpha, 0.0, 0.25, default, set(layer[tooltip].visible,false), copy(layer[tooltip].x,mouse.stagex); copy(layer[tooltip].y,mouse.stagey); );"
/>



Now, every time I move the mouse out of the hotspot, the getHotspot function will be executed but the tooltip won't disappear anymore. But when I delete "onout" function in hotspot, the tooltip will work perfectly(disappeared when I move out of the hotspot).


Can anyone help me to solve this problem, please?

2

Sunday, February 11th 2018, 8:08am

onout="tween(layer[tooltip].alpha, 0.0, 0.25, default, set(layer[tooltip].visible,false), copy(layer[tooltip].x,mouse.stagex); copy(layer[tooltip].y,mouse.stagey); ); js(getHotspot(get(name),onout));"

3

Sunday, February 11th 2018, 8:32am

onout="tween(layer[tooltip].alpha, 0.0, 0.25, default, set(layer[tooltip].visible,false), copy(layer[tooltip].x,mouse.stagex); copy(layer[tooltip].y,mouse.stagey); ); js(getHotspot(get(name),onout));"
Thank you! It works now! *thumbsup*