[Stream sound pack] Is there a way to pause/unpause sounds when game is paused?

Darkhog

  • Posts: 1243
I'd like to achieve similar result like Flixel is doing with FlxSounds - pause streamed music when pause is activated and unpause it when game is played again. How to achieve that?

There are no impossible things. There is only lack of skills.
Don't click this if your computer has less than 641 kilobytes of RAM.
Stencyl stencyling stencylish stencylers :D

HNF

  • Posts: 232
That is a problem. You would need a Boolean to determine whether or not the pause is activated.

Darkhog

  • Posts: 1243
I think FlxG.pause may be useful. Now how to make it work? I've tried to modify Background music by stream behavior like one in attachment, but it resulted in music playing multiple times at once and hurting my ears.


//edit: Also tried variant without not with the same result.

There are no impossible things. There is only lack of skills.
Don't click this if your computer has less than 641 kilobytes of RAM.
Stencyl stencyling stencylish stencylers :D