Sie sind nicht angemeldet.

Kev-in-spain

Fortgeschrittener

  • »Kev-in-spain« ist der Autor dieses Themas

Beiträge: 152

Wohnort: Barcelona

Beruf: VR Photographer

  • Nachricht senden

1

Dienstag, 12. April 2011, 10:18

iphone hotspot

Does anyone have any idea why a hotspot would function only once on an iphone?
I have three hotspots in a tour, each opening an information panel and they all function correctly on the desktop. However, on the iphone (3 & 4), after any of them are actioned, it, and both of the other hotspots, do not work.
Here's the tour:
http://www.projectsolutions.es/demos/hyundai/i30/tour.html

This is the relevant section of the xml:

<style name="info_spot"
url="files/hotspots/fs1.png"
distorted="true"
scale="0.45"
zorder="10"
alpha="0"
frames="19" framewidth="64" frameheight="64" frame="0"
altonloaded="if(isphone, mul(scale,2)); onloaded();"
/>

<hotspot name="spot1" style="info_spot" ath="139" atv="6.75" onhover="showtext(Clique para más información, buttonstyle);"
onclick="lookto(138,7,85,smooth(150,30,40)); if(plugin[image].visible,closeimage()); showImage(files/graphics/windows.png);rotOff()" />
<hotspot name="spot2" style="info_spot" ath="208" atv="18.65" onhover="showtext(Clique para más información, buttonstyle);"
onclick="lookto(208,20,80,smooth(150,30,40)); if(plugin[image].visible,closeimage()); showImage(files/graphics/sound.png);rotOff()" />
<hotspot name="spot3" style="info_spot" ath="-80" atv="-8.75" onhover="showtext(Clique para más información, buttonstyle);"
onclick="lookto(-80,-6,80,smooth(150,30,40)); if(plugin[image].visible,closeimage()); showImage(files/graphics/safety.png);rotOff()" />

<plugin name="image" url=""
alpha="0" keep="true" align="center" onclick="closeimage()" />

<action name="showimage">
set(plugin[image].url,%1);
tween(plugin[image].alpha,1);
</action>

<action name="closeimage">
tween(plugin[image].alpha, 0,,,
tween(view.fov, 95,0.7,,
set(plugin[image].url,);
rotOn())));
</action>

Here's the full xml:
http://www.projectsolutions.es/demos/hyundai/i30/i30.xml

Thanks
Kev

Beiträge: 1 857

Beruf: Virtual Tours - Photography - Krpano developer

  • Nachricht senden

2

Dienstag, 12. April 2011, 14:26

Typo in showImage, use showimage

Your toggle seems like it would work with more sense with another comma instead of a semi colon.

If then else
If visible, close, show
Not
Is visible, close;
Show;
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

Kev-in-spain

Fortgeschrittener

  • »Kev-in-spain« ist der Autor dieses Themas

Beiträge: 152

Wohnort: Barcelona

Beruf: VR Photographer

  • Nachricht senden

3

Mittwoch, 13. April 2011, 17:27

Thanks for your input sacha.

The typo, although a stupid oversight on my part, makes no difference to the actions and neither does changing the toggle. In fact, the toggle is only there because I copied and pasted the code from another tour and didn't go through it properly... hence the typo. Even without the toggle, everthing works fine on the desktop.

I have investigated a little further and narrowed it down to this:

<action name="closeimage">
tween(plugin[image].alpha,0,,,
tween(view.fov,95,0.7);

set(plugin[image].url,);
rotOn()));
</action>

On the desktop, this action works fine. On the iphone it stops after " tween(view.fov,95,0.7); " which means the image is still there, though not visible, and blocking any further attempts to touch another hotspot.

I know there is nothing wrong with the structure of the action because I can substitute
set(plugin[image].url,); for set(plugin[image].visible,false,); and it works fine.
Of course, this is a workaround for my problem but, I'm intrigued to know why
set(plugin[image].url,%1); works, but set(plugin[image].url,); doesn't. *confused*

Beiträge: 1 857

Beruf: Virtual Tours - Photography - Krpano developer

  • Nachricht senden

4

Mittwoch, 13. April 2011, 17:35

Another question would be why are you clearing out the url in the first place? I see no point in doing it.
And try to finish the function
set(...url,'');
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

5

Mittwoch, 13. April 2011, 17:47

there are some bugs in the iphone JS where if there is a blank textfield or blank url it crashes. try "null" instead if just leaving it blank. otherwise create a 100% transparent image and use that as the dummy image. when the dummy image is visible make krpano think it is not.

Kev-in-spain

Fortgeschrittener

  • »Kev-in-spain« ist der Autor dieses Themas

Beiträge: 152

Wohnort: Barcelona

Beruf: VR Photographer

  • Nachricht senden

6

Mittwoch, 13. April 2011, 18:25

Sacha
Another question would be why are you clearing out the url in the first place? I see no point in doing it.
Well, I have to do something with it otherwise, as I said before, it blocks any further attempts to touch another hotspot and, as I'm new to this coding, I don't know any other way than set(....url,); , set(....scale,0); or set....visible,false);

VN,
I tried set(....url,null); but this didn't solve the problem either.
I say 'problem' but it actually isn't anymore as I can use set(....visible,false); so I'll think I'll stick with that for now and concentrate on sorting out bigger issues. *thumbup*

Thanks for your input.