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.

1

Sunday, September 29th 2019, 11:10am

Help Me to add Sound Effect when User Click Hotpot icon

Hi i need help for add Sound Effect when User Click Hotpot icon.just need to add sound effect when user click Hosspot icon..Thanks

Tuur

Sage

Posts: 3,184

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

2

Sunday, September 29th 2019, 4:51pm

Hi,

here a simple example with sound and graphics.

https://www.virtualtuur.com/krpano/120/examples/sound/1/
https://www.virtualtuur.com/krpano/120/e…ound/1/tour.xml

always preload your sounds like this

Source code

1
2
3
    <action name="PrepareSounds" autorun="onstart">
        preloadsound(sound/explosion.wav); 
    </action>


and onclick on hotspot

Source code

1
playsound('auto',sound/explosion.wav);


don't forget the soundinterface

Source code

1
2
3
4
5
6
7
8
9
10
    <plugin name="soundinterface" 
        keep="true"
        url="plugins/soundinterface.js"
        preload="true"
        volume="1.0"
        mute="false"
        worldscale="1.0"
        autopause="true"
        autounlock="true"
        />


Hope it helps!
Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

3

Friday, October 4th 2019, 5:31pm

@Tuur Thank you very much for your help :)

Similar threads