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.

esys

Intermediate

  • "esys" started this thread

Posts: 267

Location: Balazé France

Occupation: photographer

  • Send private message

1

Saturday, April 16th 2011, 12:34pm

Hotspot bug issue with flyin out style.

Hi,

I use a pichotspot style in my pano on iPod. essai
It works great in a normal way.Problem is when you do a second touch on the hotspot while the picture is shown (it could happen if the hotspot appears in a corner), it bugs, the picture never goes back. It's only on the iPhone or iPod devices, it don't on PC (you can click several times on the hotspot, the picture goes back when clicking).?!

I tried to change the scale (the only variable you could change on iPhone) via the "showpic" or "flyin" action. Problem is, with those actions, the picture become the hotspot ! (original code)

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
    <action name="calc_flyout_size">
		div(screen_sideaspect, stagewidth, stageheight);
		div(hotspot_sideaspect, hotspot[%1].width, hotspot[%1].height);
		
		if(screen_sideaspect LT hotspot_sideaspect,
			<!-- align at screen width -->
			div(hotspot[%1].width,stagewidth,stageheight);
			mul(hotspot[%1].width,120);
			txtadd(hotspot[%1].width,'%');
			set(hotspot[%1].height,prop);
		  ,
		  <!-- align at screen height -->
			set(hotspot[%1].width,prop);
			set(hotspot[%1].height,120%);
		  );
	</action>

	<!-- fly in a hotspot = show hotspot fixed at screen -->
	<action name="flyin">
		if(hotspot[%1].flying == 0.0, hotspot[%1].resetsize(); calc_flyout_size(%1); );
		if(hotspot[%1].oldscale === null, copy(hotspot[%1].oldscale, hotspot[%1].scale) );
		if(hotspot[%1].oldrx === null, copy(hotspot[%1].oldrx, hotspot[%1].rx) );
		if(hotspot[%1].oldry === null, copy(hotspot[%1].oldry, hotspot[%1].ry) );
		if(hotspot[%1].oldrz === null, copy(hotspot[%1].oldrz, hotspot[%1].rz) );
		set(hotspot[%1].enabled,true);
		set(hotspot[%1].visible,true);
		tween(hotspot[%1].alpha,  1.0);
		tween(hotspot[%1].flying, 1.0);
		tween(hotspot[%1].scale,  0.8);
		tween(hotspot[%1].rx, 0.0);
		tween(hotspot[%1].ry, 0.0);
		tween(hotspot[%1].rz, 0.0);
	</action>

	<!-- fly the hotspot out/back -->
	<action name="flyout">
		set(hotspot[%1].enabled,false);
		tween(hotspot[%1].alpha,  0.0, 0.5, default, set(hotspot[%1].visible,false); );
		tween(hotspot[%1].flying, 0.0);
		tween(hotspot[%1].scale,  get(hotspot[%1].oldscale));
		tween(hotspot[%1].rx,  get(hotspot[%1].oldrx));
		tween(hotspot[%1].ry,  get(hotspot[%1].oldry));
		tween(hotspot[%1].rz,  get(hotspot[%1].oldrz));
		stopallsounds();
		set(plugin[son_2].scale,0.0);
		set(plugin[mute_2].scale,0.0);
	</action>	       
	
	 <action name="showpic">

	 		playsound(ex-voto,%SWFPATH%/music/ex-voto.mp3);
			if(hotspot[get(pic)] === null,
			txtadd(picfilename,'%CURRENTXML%/images/pic_',get(pic),'.jpg');
			addhotspot(get(pic));
			getcenter(hsath,hsatv);
			copy(hotspot[get(pic)].ath, hsath);
			copy(hotspot[get(pic)].atv, hsatv);
			set(hotspot[get(pic)].visible,false);
			set(hotspot[get(pic)].distorted,true);
			set(hotspot[get(pic)].zorder,2);
			set(hotspot[get(pic)].scale,0.1);
			set(hotspot[get(pic)].alpha,0.0);
			<!--set(hotspot[get(pic)].effect,glow(0xFFFFFF,1.0,30,10000);dropshadow(10,45,0x000000,10,0.3););-->
			set(hotspot[get(pic)].onloaded, flyin(get(name)) );
			set(hotspot[get(pic)].onclick, flyout(get(name)) );
			copy(hotspot[get(pic)].url,picfilename); 
		,
			flyin(get(pic));
		);
		
	</action>

Any suggestion would be pleased.
Thanks. *smile*
Steph
Steph

Posts: 1,850

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

2

Saturday, April 16th 2011, 3:18pm

Remove the hotspot when showing the picture.
If you click it when the pic is shown, it breaks ... Or make some logic in your function to not do whatever if your photo is visible.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

esys

Intermediate

  • "esys" started this thread

Posts: 267

Location: Balazé France

Occupation: photographer

  • Send private message

3

Sunday, April 17th 2011, 3:25pm

Hi Sachagriffin,

That's the problem, whatever your change to this hotspot, it affects the picture, because the hotspot become the picture. The bug is only on iPhone.?! So you can use only the scale variable to hide the original hotspot while the pîcture is shown.
I'm not able to separate the original hotspot from the picture and then write a scale action when picture flyin.

I've tried to set the scale variable with the hotspot name, it didn't work.

Any help would be pleased.
Thanks. *smile*
Steph.
Steph