What @JoshJanusch said is true -- you will have to manage it yourself, though setting stage.frameRate
might help in your case.
Most activate/deactivate managers I've seen do some of the following:
- Set
stage.frameRate
to 0.01 (slows animations andENTER_FRAME
event listeners, saving CPU/battery especially on mobile) - Stop sounds (if you play all sounds through some
SoundManager
class, this may be easy) - Manage your use of
setInterval
orsetTimeout
as they're Timers that continue to fire - Consider suspending any other asynchronous activity (like network requests or background
Workers
)
Feel free to make suggestions for this list in the comments.