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? -

keyboard - C++ GetAsyncKeyState alternative -

android - java.net.UnknownHostException(Unable to resolve host “URL”: No address associated with hostname) -