Skip to content

Instantly share code, notes, and snippets.

@marchbold
Last active August 29, 2015 14:26
Show Gist options
  • Save marchbold/0d3f6fc505d12fab3a24 to your computer and use it in GitHub Desktop.
Save marchbold/0d3f6fc505d12fab3a24 to your computer and use it in GitHub Desktop.
Listening to volume change events
if (Volume.isSupported)
{
Volume.service.addEventListener( VolumeEvent.CHANGED, volumeChangedHandler );
Volume.service.register();
}
...
private function volumeChangedHandler( event:VolumeEvent ):void
{
trace( event.type + "::" +event.volume + " [" + event.stream + "]" );
}
// com.distriqt.Volume
@marchbold
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment