Page 1 of 1

[EOS] Sound events

Posted: Sun Oct 02, 2022 12:41 am
by verynicekojak
Hi,

I'm trying to use sound.addEventListener, sound.dispatchEvent, and sound.removeEventListener, but I have a feeling that only first of those is working.

Using code example from documentation:

Code: Select all

sound.dispatchEvent( new Event( "play" ) );
doesn't dispatches the event. Only standard sound.play() does it.

Also trying to remove listener is not working. When I use add+remove more than once, I get the same event many times.

Anyone had success with those methods?
Are there any other events than "play" and "end"?

BR,
VNK