Flash CS5/AS3 :: Problem with playing audio loaded in an external swf

Hi,

I am having a strange issue which seems to be happening because of a call to play an externally loaded audio clip.

The setup is as follows:
[LIST]
[]The main container loads the configuration xml files, the swf containing the audio clips and rest of the swf representing different screens in the application.
[
]Once everything is loaded, it displays the loaded assets in a fixed order and keeps a track of the selections made on each screen. Then the games are loaded/unloaded as needed.
[/LIST]All this is working fine on pretty much all the systems we have tested so far. The problem came when someone from the client side complained that the flash content simply displays a blank screen after he clicks through the first one.

We were not able to replicate the issue anywhere and it was not happening with more than a couple of people on their side so it was difficult to even pinpoint the exact problem. Then I commented out the line which makes the call to the AudioManager class to play a music clip after the first screen has been unloaded, and now the application seems to be working perfectly well with everyone on their side.

The target system was running Flash Player 11.1 on IE6. Does that have anything to do with the problem or is it an entirely flash related issue? I am guessing that it could be something to do with security settings/cross-domain policy or something which was not allowing the main container to get a reference to the loaded audio clips inside the externally loaded swf but right now I am not sure.

The code snippets are shown below. I can post more of them if needed:

The function which gets called after the first screen is over:

private function characterSelectedHandler(e:CustomEvent):void 
        {
            
            var selections    :Array        = (e.args as Array).slice() as Array;
            var holder        :Sprite        = this.getChildByName('charMC') as Sprite;
            
            _role                        = selections[0] as String;
            _avatar                        = selections[1] as String;
            _audio                        = selections[2] as String;
            
            
            this.removeChild(holder);
            
            initGlobalControls();
            
            displayNextAsset();
            
        }

**The first function call inside the previous snippet **(The commented out command to play the music file is what fixed the problem for us):


private function initGlobalControls():void         
{                        
var audioMode    :String        = _audio as String;            
var audioFlag    :Boolean    = (audioMode == 'on') ? true : false;
 
GlobalControls.getInstance().init();            
GlobalControls.getInstance().activateButtons(['exit', 'audio']);            
GlobalControls.getInstance().setAudioStatus(audioMode);// 'off');           
GlobalControls.getInstance().addEventListener(CustomEvent.APPLICATION_EXIT, applicationExitHandler);                        
AudioManager.getInstance().toggleAudio(audioFlag);            
//AudioManager.getInstance().playAudio('bgMusic');                        
this.addChild(GlobalControls.getInstance());                                
}

‘bgMusic’ is the linkage identifier for the audio clip inside a swf which was loaded earlier. It’s working fine on pretty much every other system so I am not sure why that is creating problem on some specific systems.

I will really appreciate any help or pointers you guys can throw this way. :slight_smile: