actionscript 3 - deactivate sound in as3 when the game terminates or loses focus -


i trying deactivate sound of application when user terminates or close application, have used event listener:

stage.addeventlistener(event.deactivate, ondeactivate);//error  private function ondeactivate(e:event) {             _channel.stop(); } 

but not working:

error:access of undefined property deactivate -1119: access of possibly undefined property deactivate through reference static type class.

sugessions please.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -