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.

Mael B.

Trainee

  • "Mael B." started this thread

Posts: 149

Location: France, Montpellier

  • Send private message

1

Thursday, October 24th 2019, 12:29pm

Use events of the new sound interface

Hi,
can someone explain me how to use the sound events from the new sound interface ?

Source code

1
2
3
4
5
6
sound[name].onloaderror
sound[name].onplay
sound[name].onpause
sound[name].onstop
sound[name].onseeked
sound[name].oncomplete

I don't get the syntax to launch an action when one of this event occurs.

Tuur

Sage

Posts: 3,193

Location: Netherlands

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

  • Send private message

2

Thursday, October 24th 2019, 1:57pm

Hi,

look here: https://krpano.com/plugins/soundinterface/#soundobject

There is an small example: tween(sound[sound1].volume, 0.5);

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

3

Thursday, October 24th 2019, 2:04pm

its simple... just

set(sound[name].onplay, 'trace("yehh, playing!")');
set(sound[name].onstop, 'trace("ouch, stopped.")');

Mael B.

Trainee

  • "Mael B." started this thread

Posts: 149

Location: France, Montpellier

  • Send private message

4

Thursday, October 24th 2019, 3:15pm

its simple... just

set(sound[name].onplay, 'trace("yehh, playing!")');
set(sound[name].onstop, 'trace("ouch, stopped.")');

Thanks ! *thumbup*
I was trying somethings much more complicated !! *g*

Similar threads