1 Reply Latest reply on Jun 14, 2010 5:36 AM by BhaskerChari

    SWFLoader - Loading swf files that have sound

    jseekumar

      Hi,

       

      I am using Flex sdk 3.0. In an example I am trying out, I have a SWFLoader and 2 Buttons. When the first Button is clicked, I am loading the SWFLoader with a swf file (that has sound). When the second Button is clicked, I am loading the SWFLoader with a different swf file (that has sound too).

       

      The issue I am facing is - when the second swf file is playing, I am hearing sounds from both the swf files.

       

      I am just using the SWFLoader's load() method in each of the Button's click-event-handlers.

       

      Could anybody help me how I could solve this issue?

       

      Thank you.

        • 1. Re: SWFLoader - Loading swf files that have sound
          BhaskerChari Level 4

          Hi jseekumar,


          Try to make use of the SwfLoaders unload method.

          When you click second button try to unload the first SWF file by using the below line of code....

          swfLoader.unloadAndStop(true);

           

          After this try to assign the new SWF source as below:

           

          swfLoader.load("secondswf.swf");

           

          Try to set the autoload propert of the SWF to false.

           

          Hope this helps..

           

          If this post answers your question or helps, please kindly mark it as such.


          Thanks,

          Bhasker Chari