Sie sind nicht angemeldet.

Mael B.

Schüler

  • »Mael B.« ist der Autor dieses Themas

Beiträge: 157

Wohnort: France, Montpellier

  • Nachricht senden

1

Donnerstag, 24. Oktober 2019, 12:29

Use events of the new sound interface

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

Quellcode

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

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

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

  • Nachricht senden

2

Donnerstag, 24. Oktober 2019, 13:57

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*

3

Donnerstag, 24. Oktober 2019, 14:04

its simple... just

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

Mael B.

Schüler

  • »Mael B.« ist der Autor dieses Themas

Beiträge: 157

Wohnort: France, Montpellier

  • Nachricht senden

4

Donnerstag, 24. Oktober 2019, 15:15

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*

Ähnliche Themen