How do I mute the game via javascript

Get help using Construct 2

Post » Tue Feb 09, 2016 10:41 am

Hello :)

I'm using callbacks to pause and unpause a game while showing ads.
This can be very easy managed by calling cr_setSuspended(true) (ad starts) and cr_setSuspended(false) (ad ends).
Now i am dealing with a game where this 2 calls cause troubles (overlay problems, etc) and i would like to know if there exist something like cr_setMuted() to just mute/unmute the game while showing ads.
Maybe there is a possibility via cr_getC2Runtime()?
Thanks in advance!
Posts: 8
Reputation: 212

Post » Tue Feb 09, 2016 8:35 pm

If you look in the function object section of the manual you can call a function in the event sheet from javascript. You could then mute it there in the event sheet.
Posts: 5,521
Reputation: 83,505

Return to How do I....?

Who is online

Users browsing this forum: blistick, gianghl1983, worm1 and 28 guests