FORUMS: list search recent posts

AS3 code to mute music on incoming calls affects other phone actions

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Keith Anthony
AS3 code to mute music on incoming calls affects other phone actions
on Dec 26, 2013 at 2:52:25 pm

i have this code
if (Capabilities.cpuArchitecture=="ARM") {
NativeApplication.nativeApplication.addEventListener(Event.ACTIVATE, handleActivate2, false, 0, true); NativeApplication.nativeApplication.addEventListener(Event.DEACTIVATE , handleDeactivate2, false, 0, true);

function handleActivate2(event:Event):void {
var transformGlobal1:SoundTransform=new SoundTransform();

function handleDeactivate2(event:Event):void {
var transformGlobal2:SoundTransform=new SoundTransform();

so that my music app mutes the music while someone is calling the phone. Now when the phone goes on sleep the music mutes as well. i do not want this to happen since i would like the user to keep listening to the music while the screen is off(saves battery too). anyway around it or can the code be tweaked?
another option could be that my app has a button in my app that triggers a screen dim/off while using the KEEP_AWAKE method.

Thanks in advance

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved