You are not logged in.

1

Tuesday, June 12th 2012, 1:35pm

Help with flyout image

Hi,

I'm completely new to Krpano and I'm attempting to learn by amending the "demotour-weingut".

I've identified the following problems:
1) On the iphone/html5 version the hotspots are replaced with a png image but the flyout picture is displayed underneath these spots. I'd like to either, make them invisible when an image is displayed (this solves the problem of opening 2 pictures at once), or change the depth order of the displayed pics so that they always appear on top.

Maybe add something here to make the zicon.png invisible onClick?

Source code

1
					if(hotspot[get(pic)] === null,			txtadd(picfilename,'%CURRENTXML%/graphics/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,20,5);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));		);


2) I noticed that at least on the iphone 3g the spots do not respond to press consistently. In particular If you open an image it won't close on click until you pan the scene.
I was hoping to add some code to the action above to cause the scene to pan a small (negligible) amount onClick. I'm not sure if it will work, but this worked for jumping spots in fpp so I figure its worth a try.

3) The time it takes to load the display pictures on the iphone (wifi connection) in particular is too long and results in a delay between clicking spots madly and then a bunch or pictures pop up all at once. I've setup an example with my own images. I may have to reduce the display picture sizes further but since the tour is not for iphone only there is a limit to how much I can do this.

Ideally I'd like to display a low-res pic when either gets replaced when the high res image is displayed or sits behind it at a lower depth. Any advice on this would be much appreciated.

Please note I'm just cutting and paste-ing code at the moment. I've gone through the excellent tutorial on actions and I'm starting to figure out what each block of code does but I'm not able to form my own yet - unless I fine a block of code that makes a spot visible/invisible I'm not able to apply it from the info in the docs and I really have no clue how to inject it into the complex If/but statements without a working example. So please try to give full examples *love*

Many Thanks
Yaz

2

Tuesday, June 12th 2012, 5:56pm

So far I've found out the following:

1) set(hotspot[get(pic)].zorder,2);
In the <action name="showpic"> this should set the generated hotspot to to zoder="2". This is part of the example code and it looks like its meant to insure the icon is below the displayed image because the spot style <style name="pichotspot" > states a zorder="1"
But it doesn't appear to be working. Does anyone have a fix for this???
There is a working example in the tour named "demotour-kuchlerhaus". In this example the displayed picture spot is not generated. There are 2 spots the zoomIcon which fires the flyout action onClick, and the display image. These both have their own zorders and that works fine on desktop and Iphone.
Is it a bug that only shows up when a spot is generated on the fly? Or is there a better way to set the spot depth in the flyout action code?

2) I've managed to make the zicon invisible by adding [ set(hotspot[get(name)].visible,false); ] to the "showpic" action like so:-


<action name="showpic">
<!-- creates a new hotspot and fly it out -->
if(hotspot[get(pic)] === null,
txtadd(picfilename,'%CURRENTXML%/graphics/pic_',get(pic),'.jpg');
addhotspot(get(pic));
getcenter(hsath,hsatv);
set(hotspot[get(name)].visible,false);

copy(hotspot[get(pic)].ath, hsath);
copy(hotspot[get(pic)].atv, hsatv);
set(hotspot[get(pic)].visible,false); ............. )

This works but I need to add something to the flyout or flyin (I'm not sure which), to get the name of the spot that has become invisible and then make it visible again after the displayed picture is closed.

Thanks


3

Thursday, June 14th 2012, 11:07am

Hi,

for the distorted hotspots clicking/zorder problems in the HTML5 viewer - please have a look into this thread:
1.0.8.15 pre-release (update 2)

best regards,
Klaus

ramirox3

Intermediate

Posts: 354

Location: La Ceja, Colombia

Occupation: photographer

  • Send private message

4

Tuesday, July 31st 2012, 2:08am

position of zoomicon

I created two fly images based on example tour, all is fine except the position of zoomicon in iDevices
how I can change the position due it doesnt are where must be, the position the hotpot for flash is correct and works fine
The parameters ox="+40" oy="+30" I tried modify but the change is minimal
thanks in advance
Ramiro

ramirox3

Intermediate

Posts: 354

Location: La Ceja, Colombia

Occupation: photographer

  • Send private message

5

Tuesday, July 31st 2012, 11:27pm

solved!!!