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.

jl-krp

Intermediate

  • "jl-krp" started this thread

Posts: 140

Location: Bath

Occupation: Panographer - hobby and commercial

  • Send private message

1

Thursday, October 17th 2013, 11:55pm

on hover? on click?

Hi
I have an overlay on a pano where I'd like the user to be able to hear some audio when hovering, then go to another scene when s/he clicks

This is what I've used:

onhover="stopallsounds();playsound(auto,sounds/2dante.mp3|2dante.ogg);"
onclick="loadscene('scene_1',null,MERGE,BLEND(1));"

but it only plays the audio when clicked and does not go the next scene - what am I doing wrong? (Mac desktop, initially)

thanks

JL

2

Friday, October 18th 2013, 2:24am

attribute name full variable name type default value

onover

layer[name].onover

Action Event

Actions / functions that will be called when the mouse moves over the layer/plugin element.
attribute name full variable name type default value

===================================================================================================
onhover

layer[name].onhover

Action Event


Actions / functions that will be called in intervals (15 times per second) when the mouse stays over / hovers the layer/plugin element.

==================================================================

Try onover

jl-krp

Intermediate

  • "jl-krp" started this thread

Posts: 140

Location: Bath

Occupation: Panographer - hobby and commercial

  • Send private message

3

Friday, October 18th 2013, 9:39am

Many Thanks - over not hover

Hello Jarredja

When in doubt remove the 'h', and it works!

I should have said that I was using a hotspot with a text layer. I've changed it to a layer but I'm not at all clear as to the difference between hotspots, layers and plugins as yet, they seem to be interchangeable. This L curve is a steep climb but worthwhile.
Now I'd like to limit the audio to a single 'play' - will work on it...

best wishes

JL

Alexey Tkachenko

Professional

Posts: 737

Location: Sevastopol, Crimea, Russian Federation

Occupation: Interpreting, Building virtual tours

  • Send private message

4

Friday, October 18th 2013, 9:47am

Concerning differences between hotspots, layers and plugins: hotspots are located inside the panorama and aligned in panoramic coordinates, whereas layers/plugins are located on the screen area and aligned to its width/height and x/y.

What about playing the sound just once, try this code:

Source code

1
playsound(auto,sounds/2dante.mp3|2dante.ogg,1);


value "1" in the end means that the sound must be played just once. If you need it to be played in loops, place "0".

See here for more details:

http://www.krpano.com/plugins/soundinterface/#actions
Regards,

Alexey

jl-krp

Intermediate

  • "jl-krp" started this thread

Posts: 140

Location: Bath

Occupation: Panographer - hobby and commercial

  • Send private message

5

Friday, October 18th 2013, 10:03am

Got it, already

Thanks Alex
I actually managed to work that out myself - I must be learning something...
Thanks also for the clear definitions of hotspots etc. very helpful.
JL

Similar threads