Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

1

Montag, 20. September 2010, 01:06

Hotspot to open image

Hello again,

Is there a good simple example of using a hotspot icon to open a jpg or png? Sorry I've been scouring the forum but can seem to find anything that works.

Thanks in advance.

Robert

2

Montag, 20. September 2010, 15:55

Hello again everyone,

Managed to get something working based on an example but not exactly as I wanted it. Basically I have an icon for my hotspot and it opens an image. Right now i'm using the onclick command but for some reason the hostspot only becomes active when I pan to a certain spot in the pano and then the image opens. Would like to the image to really appear where in the area that the hotspot was clicked and then I need to figure out a way to close image by clicking on it.

<action name="open">
set(plugin[%1].visible,true);
tween(plugin[%1].alpha,1);
</action>


<plugin name="openimage"
url="introimage.png"
align="center" x="10" y="10"
alpha="0"
/>

<hotspot name="fyi"
url="fyi.png"
ath="0"
atv="0"
scale="0.6"
alpha="0.3"
onover="tween(alpha,1);tween(scale,0.6);"
onout="tween(alpha,1);tween(scale,0.6);"
onclick="action(open,openimage);"
/>

3

Montag, 20. September 2010, 15:59

Hi,

good example, but I would recommend also adding - visible="false" - to the image definition,
otherwise the image is still there and clickable (but invisible)
<plugin name="openimage"
url="introimage.png"
align="center" x="10" y="10"
alpha="0"
visible="false"
/>
best regards,
Klaus

4

Montag, 20. September 2010, 16:18

Ah! That worked, any good examples of how to close an image by clicking the image?

5

Montag, 20. September 2010, 16:23

here:

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
<action name="open">
 set(plugin[%1].visible,true);
 tween(plugin[%1].alpha,1);
 </action>
 
<action name="close">
  tween(plugin[%1].alpha,0,0.5,default, set(plugin[%1].visible,false) );
</action>
 
 <plugin name="openimage"
 url="introimage.png"
 align="center" x="10" y="10"
 alpha="0"
onclick="action(close,get(name));"
 />
 
 <hotspot name="fyi" 
 url="fyi.png"
 ath="0"
 atv="0"
 scale="0.6"
 alpha="0.3"
 onover="tween(alpha,1);tween(scale,0.6);"
 onout="tween(alpha,1);tween(scale,0.6);"
 onclick="action(open,openimage);"
 />

6

Montag, 20. September 2010, 16:47

Thanks Klaus, You're a star! *smile*

7

Samstag, 25. April 2015, 17:54

here:

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
 set(plugin[%1].visible,true);
 tween(plugin[%1].alpha,1);
 
 

  tween(plugin[%1].alpha,0,0.5,default, set(plugin[%1].visible,false) );

 
 <plugin name="openimage" 
 url="introimage.png"
 align="center" x="10" y="10"
 alpha="0"
onclick="action(close,get(name));"
 />
 
 <hotspot name="fyi" 
 url="fyi.png"
 ath="0"
 atv="0"
 scale="0.6"
 alpha="0.3"
 onover="tween(alpha,1);tween(scale,0.6);"
 onout="tween(alpha,1);tween(scale,0.6);"
 onclick="action(open,openimage);"
 />
</plugin>
Works very well, but it takes like 3minutes to load the open action
Do you know what's wrong? it's the exact same code just with another hotspotimage

Red

Schüler

Beiträge: 94

Wohnort: Australia

Beruf: Virtual tour creator, VR app developer

  • Nachricht senden

8

Sonntag, 26. April 2015, 04:56

Is your image optimised for web? It may have to do with the image having a large file size and is taking a while to load.

9

Dienstag, 28. April 2015, 16:27

Is your image optimised for web? It may have to do with the image having a large file size and is taking a while to load.
No I found the problem.I didn't do the visible="false", it works perfectly now
Still thx for the help

10

Dienstag, 28. April 2015, 16:32

multiple image hotspots

Hello,

My next problems is, that i can't set 2 different image hotspots in the same pano...
When i try to load my vtour, this is what i get
»LemmyP« hat folgendes Bild angehängt:
  • fatal error.PNG

Beiträge: 732

Wohnort: Sevastopol, Crimea, Russian Federation

Beruf: Interpreting, Building virtual tours

  • Nachricht senden

11

Dienstag, 28. April 2015, 22:58

There's a typo or mistake in xml code, so parser throws an error. Drag and drop 'tour.xml" directly into your browser and it must show where the mistake in xml code is. This is the common and easy way to check xmls for any xml code errors.
Regards,

Alexey