Sie sind nicht angemeldet.

BriarB

Anfänger

  • »BriarB« ist der Autor dieses Themas

Beiträge: 23

Wohnort: New Zealand

Beruf: Professional Photographer

  • Nachricht senden

1

Donnerstag, 14. Januar 2010, 20:47

hotlinks to picture within a panorama

I am working on a Museum Tour, and I want to create hotspots within the individual panoramas to bring up exhibits. Is this possible and if so can someone point me in a suitable direction. The only reference I can find from krpano uses map references which I dont want here. This where I have got to so far. I then want to include sound for each panorama but one thing at a time!!!

http://www.assetimaging.co.nz/krpano/exa…iArtMuseum.html

Thanks heaps for any help

tommo77funk

Fortgeschrittener

Beiträge: 159

Wohnort: London

Beruf: Photographer

  • Nachricht senden

2

Freitag, 15. Januar 2010, 01:54

Hi BriarB,

Have a look in the examples folder which came with KRpano, do you have an example called 'google maps' ? The first example in this folder 'maps_example1.html' is a great one for what you want to do. To create a hotspot you can add this to your xml file and use the editor plugin to position it properly. You must make sure that all the urls actually point to something that exsits in your folder. For this example you will need a hotspot image or flash swf file, like hotspot_ani_black.swf, 1 thumbnail image and one normal size image (say 800px wide)

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
29
30
31
32
33
34
35
36
<hotspot name="hotspot_id"
			 url="hotspot_ani_black.swf" 
			 ath="-152.5692" atv="1.4989"
			 scale="0.5"
			 zoom="false"
			 onover="set(url,thumbnail_image.jpg);tween(scale,1);"
			 onout="set(url,hotspot_ani_black.swf);tween(scale,0.5);"
			 onloaded="resetsize();"
			 onclick="action(showpic,pic_id);"
			 />

<plugin name="pic_id"			 
			url="large_image.jpg" 
			visible="false"
			alpha="0"
			align="center"
			height="75%"
			width="prop"
			zorder="100"
			onclick="action(hidepic,pic_id);"
			/>

<action name="showpic">
		<!-- first make sure that all others are hidden -->
		action(hidepic, pic_id);

	<!-- and now show current one -->
		set(plugin[%1].enabled,true);
		set(plugin[%1].visible,true);
		tween(plugin[%1].alpha, 1, 0.50);
	</action>			
	
	<action name="hidepic">
		set(plugin[%1].enabled,false);
		tween(plugin[%1].alpha, 0, 0.25, default, set(plugin[%1].visible,false) );
	</action>


Hope this helps :)

tom

BriarB

Anfänger

  • »BriarB« ist der Autor dieses Themas

Beiträge: 23

Wohnort: New Zealand

Beruf: Professional Photographer

  • Nachricht senden

3

Freitag, 15. Januar 2010, 09:00

Thanks for that Tommo, I had seen the example you gave but it seemed to refer to longtitude and latitude rather than positions on the panorama.

I guess the line you give: ath="-152.5692" atv="1.4989"
refers to positions within the panorama, right?

I have got to work this out too: editor plugin to position it properly. I have got the swf on: C:\Data\KRPano Host\krpano-1.0.8-beta7\plugins
but what the .....do I do with it?

Where can I find the: hotspot_ani_black.swf

Love your aerial shots of London!! Reminds me of good times a long....time ago.

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »BriarB« (15. Januar 2010, 09:49)


tommo77funk

Fortgeschrittener

Beiträge: 159

Wohnort: London

Beruf: Photographer

  • Nachricht senden

4

Freitag, 15. Januar 2010, 16:46

Hi BriarB,

I just wrote a nice lengthy helpful reply went to post it and got logged out and lost my post *pinch*

Here is a quick answer then...


Yes.. you are right ath and atv are coord's within the panorama.

To use editor plugin I advise to copy the whole plugins folder and place inside the folder you are working in. I would also like to recommend doing a copy of an example folder and just replace elements (pano, images, sound, etc) with your own stuff, this helps you learn and see whats going on. By the way hotspot_ani_black.swf is in the google maps folder.

To use editor plugin place this code in your xml file

Quellcode

1
  <plugin name="editor" url="plugins/editor.swf" />


more info thispage

first click hotpsot button, then click and drag the hotspot you want to move. click close then click xml, copy and paste this generated code into you xml. Alternatively what i do is just paste in a separate document and copy the hotspot coord's over.

Hope this helps, may KRpano be with you !

tom

BriarB

Anfänger

  • »BriarB« ist der Autor dieses Themas

Beiträge: 23

Wohnort: New Zealand

Beruf: Professional Photographer

  • Nachricht senden

5

Sonntag, 17. Januar 2010, 21:43

hotlinks to picture within a panorama

Hi there from sunny New Zealand...not that I have been out as much as usual, head down in the computer trying to learn krpano is a strange summer sport. Altering the xml file, saving it then refreshing the panorama is certainly the quick way to see progress. I have got a bit further on, but more q's if you dont mind....Once I get editor to co-operate will be even faster.

1)where you put "hotspot_ani_black.swf" I have substituted a very small .jpg image, this works for the moment and allows the main picture to be loaded. I did this as the swf will not load, I am wondering if you have to but the google maps plugin first? Since I dont need that yet I have gone there. I havent found another swf that will do the job yet, but guess there is one in the woodwork soewhere.

2)I put the <plugin name="editor" url="plugins/editor.swf" /> into my xml file, along with the actual swf into the folder, but no luck, I am wondering what else I have to do to launch it.

3)Oh yes, the statement ath="250" atv="0.4989"....ath is easy, it moves the spot sideways, I got that. But what does atv do? I have altered the figure but it seems to have no effect...?

With many expressions of thanks, Briar...

6

Donnerstag, 21. Januar 2010, 11:01

Hi,
1)where you put "hotspot_ani_black.swf" I have substituted a very small .jpg image, this works for the moment and allows the main picture to be loaded. I did this as the swf will not load, I am wondering if you have to but the google maps plugin first? Since I dont need that yet I have gone there. I havent found another swf that will do the job yet, but guess there is one in the woodwork soewhere
e.g. when the "hotspot_ani_black.swf" is in the same folder as the xml file,
you could include it as hotspots with this code:

Quellcode

1
2
3
4
5
<hotspot name="spot1"
url="hotspot_ani_black.swf"
ath="0" atv="0"
onclick="loadpano(pano2.xml, null, MERGE, BLEND(1));"
/>



2)I put the <plugin name="editor" url="plugins/editor.swf" /> into my xml file, along with the actual swf into the folder, but no luck, I am wondering what else I have to do to launch it.
is the path of the editor.swf correct?
with the code in your example the editor.swf must in a "plugin" folder,


3)Oh yes, the statement ath="250" atv="0.4989"....ath is easy, it moves the spot sideways, I got that. But what does atv do? I have altered the figure but it seems to have no effect...?
ath / atv are the spherical coordinations in degrees for the hotspot,
e.g. ath can be from -180 to +180 (but also larger or smaller, then the spot will just wrap around)
and atv can be from -90 (zenith) to +90 (nadir),

here an image with the krpano coordinations system:


best regards,
Klaus

7

Montag, 9. August 2010, 10:47

Does limitview="fullrange" map everything for ATH [-180 degrees, 180 degrees ] => [-1.0, 1.0] ?

I have been trying to apply a tween to the ath and atv attributes for a .png image plugin and it is not moving. I am using the limitview="fullrange" for a partial panorama. I was trying to make a helicopter image fly across the screen when a hotspot is clicked. I am able to set the instance of the plugin to visible and observe it become visible, but the .png is not moving across the screen.

Should I be doing this with Flash CS4 or Action script using a sprite?

8

Dienstag, 10. August 2010, 09:47

Hi,

no, there is no mapping,
but e.g. when hfov is set to "1.0" then there is only a viewing range from -0.5 to +0.5,
at the ath from the hotspot must be within this range to be visible,

best regards,
Klaus

9

Dienstag, 19. Oktober 2010, 14:13

Dear all,
I'm also a beginner with krpano.
I tested the source code from tommo77funk and its really what I searched.
How can I modify this if I got several hotspots for several images in the same pano ?
should I copy paste multiple time the little plugin and actions or is it possible to add the url for the image in a parameter ?
Thanks for your reply

10

Montag, 25. Oktober 2010, 11:21

I have another question related to the two actions "showpic" and "hidepic", as I have to use it on several pano, I made several scenes and put those two "functions" outside a scene thinking that in that case it could be callable by each scene within my XML, it seems that the showpic action works but the hidepic not.
The picture is well displayed but I still have the hotspot of the pano available on mousemove but no action is done on click.
Here is my source code.
Thanks for your help

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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<krpano version="1.0.8" onstart="loadscene(scene1);">

  <action name="showpic">
	action(hidepic, %1);
		set(plugin[%1].enabled,false);
		set(plugin[%1].visible,true);
		tween(plugin[%1].alpha, 1, 0.50);
	</action>
	
	<action name="hidepic">
  		set(plugin[%1].enabled,false);
  		tween(plugin[%1].alpha, 0, 0.25, default, set(plugin[%1].visible,false) );
  </action>

  <scene name="scene1" onstart="action(showpic,pic_id);">
	<plugin name="pic_id"			 
  			url="images/scene1.jpg" 
  			visible="false"
  			alpha="0"
  			align="center"
  			height="100%"
  			width="prop"
  			zorder="1"
  	/>
  	
  	<hotspot name="hs2"
  	     	keep="false"
  	     	visible="true" enabled="true" handcursor="true" capture="true" children="true"
   	     	zorder="0"
  	     	onclick="loadscene(scene2)"
  	     	details="8"
  	     	effect=""
  	     	flying="0"
  	     	inverserotation="false"
  	     	usecontentsize="false"
  		>
  		<point ath="-10.203974" atv="-14.529570" />
  		<point ath="14.215853" atv="-14.320044" />
  		<point ath="14.215853" atv="22.470038" />
  		<point ath="-10.388858" atv="22.925972" />
  	</hotspot>
  </scene>

	<scene name="scene2" >
	<view hlookat="180" vlookat="5" fovtype="MFOV" fov="53" maxpixelzoom="1.0" fovmax="100" />
  
  	<preview type="CUBESTRIP" url="images/scene2.jpg" />
  
  	<image type="CUBE" multires="true" tilesize="4000">
  		<level tiledimagewidth="1024" tiledimageheight="1024">
  			<left  url="images/scene2-O.jpg" />
  			<front url="images/scene2-N.jpg" />
  			<right url="images/scene2-E.jpg" />
  			<back  url="images/scene2-S.jpg" />
  			<up	url="images/scene2-H.jpg" />
  			<down  url="images/scene2-B.jpg" />
  		</level>
  	</image>
  	
  	<hotspot name="img2"
  	     	keep="false"
  	     	visible="true" enabled="true" handcursor="true" capture="true" children="true"
   	     	zorder="0"
   	     	alpha="0"
  	     	fadeintime="0.150" fadeouttime="0.300" fadeincurve="1.100" fadeoutcurve="0.700"
  	     	onclick="action(showpic,pic_id2);"
  	     	details="8"
  	     	effect=""
  	     	flying="0"
  	     	inverserotation="false"
  	     	usecontentsize="false"
  		>
  		<point ath=" 18.0535" atv=" 44.2088" />
  		<point ath=" 31.9796" atv=" 43.2639" />
  		<point ath=" 38.1003" atv=" 54.5947" />
  		<point ath=" 16.9682" atv=" 56.1511" />
  	</hotspot>
  	
  	<hotspot name="img3"
  	     	keep="false"
  	     	visible="true" enabled="true" handcursor="true" capture="true" children="true"
   	     	zorder="0"
   	     	alpha="0"
  	     	fadeintime="0.150" fadeouttime="0.300" fadeincurve="1.100" fadeoutcurve="0.700"
  	     	onclick="action(showpic,pic_id3);"
  	     	details="8"
  	     	effect=""
  	     	flying="0"
  	     	inverserotation="false"
  	     	usecontentsize="false"
  		>
  		<point ath=" -8.9218" atv=" 45.5182" />
  		<point ath="  5.9200" atv=" 45.8789" />
  		<point ath="  9.8247" atv=" 58.5649" />
  		<point ath="-14.6109" atv=" 57.4699" />
  	</hotspot>

  	<plugin name="pic_id2"			 
  			url="images/img2.jpg" 
  			visible="false"
  			alpha="0"
  			align="center"
  			height="100%"
  			width="prop"
  			zorder="100"
  			onclick="action(hidepic,pic_id2);"
  			/>
	
	<plugin name="pic_id3"			 
  			url="images/img3.jpg" 
  			visible="false"
  			alpha="0"
  			align="center"
  			height="100%"
  			width="prop"
  			zorder="100"
  			onclick="action(hidepic,pic_id3);"
  			/>
  </scene>
  
</krpano>

11

Mittwoch, 27. Oktober 2010, 10:26

Any clue ?
Is it my assumption wich is false, we cannot use action as a global function ?
thanks for your help
Otherwise I will dupplicate the source with different name for actions

12

Mittwoch, 27. Oktober 2010, 23:18

Hi EricG,

Your problem comes because of your showpic action that makes the plugin to be showed enabled="false"...

Quellcode

5
set(plugin[%1].enabled,false);

then, it can not execute the hidepic action onclick ...

Quellcode

106
  onclick="action(hidepic,pic_id2);"

So, change your code like this:

Quellcode

5
set(plugin[%1].enabled,true);


Hope this help...

SAlut.