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.

21

Tuesday, October 1st 2013, 8:06pm

Doh! Sure enough!

Good eye, Alexey. Big thanks for applying it :)

Next lesson learned, in order to get one tooltip per hotspot in an HTML5 browser and one tooltip per hotspot in a Flash browser (not two), you need the following bits:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
	<!-- the 'tooltip' style - show tooltip textfield and update positions as long as hovering -->
	<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); );"
	       />
		   
		   	<!-- the 'tooltip' textfield--> 
	<layer name="tooltip" keep="true"
	       url="%SWFPATH%/plugins/textfield.swf"
	       parent="STAGE"
	       visible="false" alpha="0"
	       enabled="false"
	       align="lefttop"
	       edge="bottom"
	       oy="-2"
	       width="200"
	       autoheight="true"
	       background="false" backgroundcolor="0xFFFFFF" backgroundalpha="1.0"
	       border="false" bordercolor="0x000000" borderalpha="1.0"
	       borderwidth="1.0" roundedge="0"
	       shadow="0.0" shadowrange="4.0" shadowangle="45" shadowcolor="0x000000" shadowalpha="1.0"
	       textshadow="1" textshadowrange="6.0" textshadowangle="90" textshadowcolor="0x000000" textshadowalpha="1.0"
	       css="text-align:center; color:#FFFFFF; font-family:Arial; font-weight:bold; font-size:14px;"
	       html=""
	       />


plus the call of the tooltip style (my typo above)

and the showttext() function ignored via settings like tooltips_hotspots="false"

Can anyone offer any pointers on a template that inserts linked scene titles into the hover text field?

Alexey Tkachenko

Professional

Posts: 757

Location: Sevastopol, Crimea, Russian Federation

Occupation: Interpreting, Building virtual tours

  • Send private message

22

Tuesday, October 1st 2013, 8:22pm

Try replace the line:

Source code

1
copy(layer[tooltip].html, tooltip);


with this one:

Source code

1
copy(layer[tooltip].html, scene[get(linkedscene)].title);


This should work, if you have "title" attribute for each scene, of course
Regards,

Alexey

23

Friday, October 4th 2013, 6:01pm

Hi Taurus

Thanks for pointing that. I already fixed it. Thanks

24

Tuesday, October 8th 2013, 1:46pm

Thanks!! HTML5 hover text on thumbnails?

Dear Alexy,

Sorry for my delayed gratitude. I've just now been able to return to this project, and to apply your solution, which works :)

Others may view the full working solution for Flash + HTML5 hover text on hotspots here:

http://djunapix.com/photos/NIhiwatuVirtualTour2/tour.html
http://djunapix.com/photos/NIhiwatuVirtualTour2/tour.xml
http://djunapix.com/photos/NIhiwatuVirtu…2/vtourskin.xml

Now how about the same solution for thumbnails??

Many thanks!!
Djuna

Alexey Tkachenko

Professional

Posts: 757

Location: Sevastopol, Crimea, Russian Federation

Occupation: Interpreting, Building virtual tours

  • Send private message

25

Tuesday, October 8th 2013, 2:11pm

Well, to do that you'll have to decide which way you go.

1) Replace the Flash Showtext() for thumbs by the universal thumb Tooltip for both Flash and Html5 (it's better way, as I see it).

2) Or, alternatively, have Showtext thumbs tooltips for Flash and Tooltips using Textfield for html5.

I'd take the first way.

The basic Vtourskin.xml has the 'skin_addthumbs' action. Inside it, there's a line

Source code

1
set(layer[get(thumbname)].onhover, showtext(get(scene[get(linkedscene)].title),SKIN_TOOLTIPS); );


Replace it by:


Source code

1
set(layer[get(thumbname)].onover, show_thumb_tooltips(); );set(layer[get(thumbname)].onout, hide_thumb_tooltips(); ); 


And add the "show_thumb_tooltips" action:

Source code

1
2
3
4
<action name="show_thumb_tooltips" > copy(layer[tooltip].html, scene[get(linkedscene)].title);
	               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); );</action>



and "hide_thumb_tooltip" action:

Source code

1
<action name="hide_thumb_tooltip" >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); );</action> 


Give it a try. It should work, I suppose. *smile*
Regards,

Alexey

26

Monday, June 22nd 2015, 2:40pm

Hi,

Sry for bumping this old thread, but I followed djuna's example.

I am getting this error:

download of "skin/front_arrow.png|tooltip" failed.
I don't get what I am doing wrong.

Red *sad*