[Nifty gui 1.32] How to use sound effects in java?

Hi,

i’ve tried to build playSound effects in java but
i don’t know how and i didn’t see any help in the nifty 1.32 manual.
i am trying:

 onHideEffect(new EffectBuilder("playSound") {
   {

   }
}); 

but i don’t know how to register/play sounds like in xml.
please HELP!!!

You could create your own soundmanager (+ soundobject; you can use the native jme implementation).

The soundmanager could have a method like “playSound(id soundName)”. In your case, every time the method onHideEffect is running you could play the specific soundeffect.

I hope this help. :slight_smile:

Hi Mordag,

Actually i don’t what are soundmanager & sound object and i don’t see any documentation on them
is soundmanager a nifty gui object? how do i use it?

thanks.