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
85
S
27
G
85
Posts: 5,065
Reputation: 57,864


Return to How do I....?

Who is online

Users browsing this forum: Alex Bryant, Congrats2u, kiko2015, Moordhuis, omnipaws, R0J0hound, tarek2 and 12 guests