Sie sind nicht angemeldet.

1

Sonntag, 11. Februar 2018, 04:42

hotspot onout event and tooltip onout event

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

Quellcode

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:

Quellcode

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

Sonntag, 11. Februar 2018, 08:08

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

Sonntag, 11. Februar 2018, 08:32

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*