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!
B
4
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.
B
94
S
33
G
118
Posts: 5,394
Reputation: 75,849


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 10 guests