Sie sind nicht angemeldet.

claire_france

Anfänger

  • »claire_france« ist der Autor dieses Themas

Beiträge: 18

Wohnort: Glasgow

Beruf: Virtual Tours, Photography, PHP & mySQL

  • Nachricht senden

1

Dienstag, 20. Mai 2014, 16:17

openurl();

Hello,

I am trying to use openurl() to open a URL from an onclick event on a hotspot.

I have tried a thousand ways to get this working and it's driving me loopy. Please can someone tell me what I am doing wrong? Here is my hotspot code from the XML file.

<hotspot name="spot1" style="skin_hotspotstyle" ath="-8.183" atv="2.442" onclick="openurl('http://krpano.com',_self)" />
also
<hotspot name="spot1" style="skin_hotspotstyle" ath="-8.183"
atv="2.442" onclick="openurl('http://krpano.com',_self);" />
and a squillion variations thereof.

The hotspot displays, but clicking on yields no response.

Gnash.
in hope,
Claire

claire_france

Anfänger

  • »claire_france« ist der Autor dieses Themas

Beiträge: 18

Wohnort: Glasgow

Beruf: Virtual Tours, Photography, PHP & mySQL

  • Nachricht senden

2

Dienstag, 20. Mai 2014, 17:37

OK, I figured this out. Phew.

The XML generated by the default krpano droplet includes a file skin/vtourskin.xml, which contains an onclick event for the style skin_hotspotstyle. This overwrites the onclick event.

I therefore added a linkedurl attribute in the same style as linkedscene to this onclick event, and it all works fine.

i.e.

Quellcode

1
if(linkedurl, openurl(get(linkedurl),_self);)

nwatts

Anfänger

Beiträge: 6

Wohnort: Dublin, Ireland

Beruf: Educational Technologist

  • Nachricht senden

3

Mittwoch, 14. Januar 2015, 14:05

Linked URL

Hi

I am struggling with the same problem. I have tried many variations of this but nothing happens on click. I created my own style. The image appears so the style is located

Any suggestions welcome

in tour.xml
<hotspot name="spot1" style="youTubeStyle" ath="55.794" atv="-14.871" linkedurl="https://www.youtube.com/watch?v=Rem9KkolKBI"/>


in vtourskin.xml

<style name="youTubeStyle" url="vtourskin_hotspot_r.png" scale="0.5" edge="top" oy="0" distorted="false"
tooltip=""
onclick= "if(linkedurl, openurl(get(linkedurl),_blank);)"
/>

4

Donnerstag, 15. Januar 2015, 11:05

Hi,

there are two cases when this might not work:

1. when testing locally with the Flashplayer (see the notes in the openurl() docu)
2. or when pop-up-blocker blocks the window

Best regards,
Klaus

nwatts

Anfänger

Beiträge: 6

Wohnort: Dublin, Ireland

Beruf: Educational Technologist

  • Nachricht senden

5

Donnerstag, 15. Januar 2015, 15:20

Testing Locally

Klaus

Thanks. Testing locally was the problem. now solved. Thanks

There is some discussion in the forums about embedding youTube videos in Krpano. Is there any way of doing this without custom js?

Thanks

6

Donnerstag, 15. Januar 2015, 16:07

Why not using the included Youtube example?
http://krpano.com/examples/118/examples/…er/example.html

7

Mittwoch, 4. März 2015, 12:01

if(linkedurl, openurl(get(linkedurl),_self);)
OK, I figured this out. Phew.

The XML generated by the default krpano droplet includes a file skin/vtourskin.xml, which contains an onclick event for the style skin_hotspotstyle. This overwrites the onclick event.

I therefore added a linkedurl attribute in the same style as linkedscene to this onclick event, and it all works fine.

i.e.

Quellcode

1
if(linkedurl, openurl(get(linkedurl),_self);)
Can you please show a screenshot of the code because i can't figure it out..
Thx