Sie sind nicht angemeldet.

1

Mittwoch, 20. Januar 2016, 11:07

how to dynamiclly add hotspot to a scene

In each scene, I setted direction hotspots, now I want to dynamiclly add hotspot tip under the direction hotspot;
for example:

Quellcode

1
2
3
4
5
6
7
<scene name="scene_1" title="Entrace" onstart="" thumburl="../panos/1.tiles/thumb.jpg" lat="29.03297222" lng="115.94229722" heading="208.0">
		<view hlookat="0" vlookat="0" fovtype="MFOV" fov="120" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />
		<preview url="../panos/1.tiles/preview.jpg" />
		<image>			<cube url="../panos/1.tiles/pano_%s.jpg" />			<mobile>				<cube url="../panos/1.tiles/mobile_%s.jpg" />			</mobile>		</image>
<hotspot name="spot1" style="skin_hotspotstyle" ath="-10" atv="22.536" linkedscene="scene_2" />
	    <hotspot name="spot3" style="skin_hotspotstyle" ath="20" atv="22.536" linkedscene="scene_3" 	       />
	</scene>


use addhotsopt() can and custom hotsopt, but how can I add the custom hotspot to the scene_1, the hotspot doesn't have parent attribute

jordi

Profi

Beiträge: 583

Wohnort: Barcelona

Beruf: creating ideas & coding them

  • Nachricht senden

2

Mittwoch, 20. Januar 2016, 11:41

Hotspots are created every time you get inside a scene, that's why they don't have parent attribute..


so for adding a tooltip hotspot dynamically, you can just say on the style of your direction hotspots

onover="addhotspot();"

and then find a way in order to relate the infos




<hotspot name="spot3" style="skin_hotspotstyle" tooltip="test tooltip">


then you would say :


onover="


addhotspot(hotspotTooltip);

set(hotspot[tooltip].url, textfield);
copy(hotspot[tooltip].html, hotspot[get(name)].tooltip);


"


onout="tween(hotspot[tooltip].alpha, 0, , , removehotspot(tooltip));"


The basic attributes (keep, x, y, ...) I did not writte but as basic structure it should work...


Hope it helps
everpano.com step beyond 360

3

Donnerstag, 21. Januar 2016, 04:25

Thank a lot, it workes! *thumbsup* *thumbsup*