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.

BriarB

Beginner

  • "BriarB" started this thread

Posts: 23

Location: New Zealand

Occupation: Professional Photographer

  • Send private message

1

Thursday, January 14th 2010, 8:47pm

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

Intermediate

Posts: 158

Location: London

Occupation: Photographer

  • Send private message

2

Friday, January 15th 2010, 1:54am

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)

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
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

Beginner

  • "BriarB" started this thread

Posts: 23

Location: New Zealand

Occupation: Professional Photographer

  • Send private message

3

Friday, January 15th 2010, 9:00am

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.

This post has been edited 1 times, last edit by "BriarB" (Jan 15th 2010, 9:49am)


tommo77funk

Intermediate

Posts: 158

Location: London

Occupation: Photographer

  • Send private message

4

Friday, January 15th 2010, 4:46pm

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

Source code

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

Beginner

  • "BriarB" started this thread

Posts: 23

Location: New Zealand

Occupation: Professional Photographer

  • Send private message

5

Sunday, January 17th 2010, 9:43pm

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

Thursday, January 21st 2010, 11:01am

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:

Source code

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

Posts: 119

Location: Portland, Oregon

  • Send private message

7

Monday, August 9th 2010, 10:47am

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

Tuesday, August 10th 2010, 9:47am

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

Tuesday, October 19th 2010, 2:13pm

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

Monday, October 25th 2010, 11:21am

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

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
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

Wednesday, October 27th 2010, 10:26am

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

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

12

Wednesday, October 27th 2010, 11:18pm

Hi EricG,

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

Source code

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

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

Source code

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

So, change your code like this:

Source code

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


Hope this help...

SAlut.