Sie sind nicht angemeldet.

zbra

Anfänger

  • »zbra« ist der Autor dieses Themas

Beiträge: 5

Wohnort: south africa

Beruf: designer

  • Nachricht senden

1

Mittwoch, 25. März 2009, 14:35

getting started - need a simple action when hotspot is clicked

Hi

Ok - been going strong for the last 3 days doing my first virtual tour and i think I've read all the docs and forum threads, my head is full of info, my text editor is full of example xmls, but i still dont seem to be able to do something as simple as making an image appear smoothly when a Hotspot is clicked, and disappear smoothly when the image is clicked. I found a recent thread making an image appear dynamicly, but without a smooth transition, and i didn't manage to remove the said image when clicked !

So here is my code :

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
  <hotspot name="winery" 
	         url="hotspot_ani.swf"
	 onclick="action(showimage,img1);"

			 />
			 

	
	<!-- images -->
	<plugin name="img1" url="image.jpg" align="center" alpha="0" visible="false" onclick="action(hideallimages);" />

	
	<!-- actions to show/hide images -->
	<action name="hideimage">
		tween(plugin[%1].alpha,0,distance(1,0.5),easeoutquad,set(plugin[%1].visible,false));
	</action>
	
	<action name="hideallimages">
		action(hideimage,img1);

	</action>
	
	<action name="showimage">
		action(hideallimages);
		set(plugin[%1].visible,true);
		tween(plugin[%1].alpha,1,distance(1,0.5),easeoutquad);
	</action>


Please - what am i doing wrong - currently nothing is happening when the hotspot is clicked ?

Thanks in advance for any help provided

Max

Graydon

Profi

Beiträge: 614

Wohnort: Texas

Beruf: Industrial gas turbine services.

  • Nachricht senden

2

Mittwoch, 25. März 2009, 16:18

I copy and pasted your code directly into a test setup I have... added the hotspot_ani.swf and an image file image.jpg... and everything worked perfect.

Do you have the logkey enabled (set to true)?

ref http://www.krpano.com/docu/xml/#krpano

If you've set it to false, change it back to true and see if you are getting any error messages... maybe it's not finding the image.jpg file?

zbra

Anfänger

  • »zbra« ist der Autor dieses Themas

Beiträge: 5

Wohnort: south africa

Beruf: designer

  • Nachricht senden

3

Donnerstag, 26. März 2009, 23:42

Thank you graydon

After a bit of hair pulling, I finally understood that the img plugin and the actions had to be moved to the first xml of my tour (tour.xml) and not be in my first pano 1.xml

Working now

I'm happy !

I'll be back later with more questions on this amazing product !