Sie sind nicht angemeldet.

21

Dienstag, 1. Oktober 2013, 20:06

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:

Quellcode

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?

Beiträge: 770

Wohnort: Russian Federation

Beruf: Interpreting, Building virtual tours

  • Nachricht senden

22

Dienstag, 1. Oktober 2013, 20:22

Try replace the line:

Quellcode

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


with this one:

Quellcode

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

Freitag, 4. Oktober 2013, 18:01

Hi Taurus

Thanks for pointing that. I already fixed it. Thanks

24

Dienstag, 8. Oktober 2013, 13:46

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

Beiträge: 770

Wohnort: Russian Federation

Beruf: Interpreting, Building virtual tours

  • Nachricht senden

25

Dienstag, 8. Oktober 2013, 14:11

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

Quellcode

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


Replace it by:


Quellcode

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


And add the "show_thumb_tooltips" action:

Quellcode

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:

Quellcode

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

Montag, 22. Juni 2015, 14:40

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*