6 Replies Latest reply on Nov 15, 2011 9:13 AM by SDdev


    Alberto Moro Level 1

      Hello guys,


      I hope someone of you have knowledge about the getEnhancedMicrophone() function.

      I'm trying to use it on my code in order to get the microphone and avoid weird audio feedback but I don't know exactly how to use it.


      Is there any class I need to import inside my as3 package?
      If I simply replace Microphone.getMicrophone() withMicrophone.getEnhancedMicrophone() it doesn't work.


      I'm using Flash CS5, AS3 and Flash Player 10.3.



        • 1. Re: getEnhancedMicrophone()
          relaxatraja Level 5

          For that you should have target to the flash player 10.3 version from your publish settings. But by default flash CS5 doesn't have the player version of 10.3.


          Download the swc from here: http://download.macromedia.com/pub/labs/flashplatformruntimes/flashplayer10-3/flashplayer1 0-3_playerglobal_052011.swc


          Step 1: Go to the locaiton C:\Program Files\Adobe\Adobe Flash CS5\Common\Configuration\ActionScript 3.0

          Step 2: Create a new folder with the name "FP10.3"

          Step 3: Copy the file and paste it in the following location:

                      C:\Program Files\Adobe\Adobe Flash CS5\Common\Configuration\ActionScript 3.0\FP10.3

          Step4: Rename the swc name to "playerglobal.swc"


          Step 5: Goto the following location C:\Program Files\Adobe\Adobe Flash CS5\Common\Configuration\Players

          Step 6: Create a copy of "FlashPlayer10_1.xml" and rename as "FlashPlayer10_3.xml"

          Step 7: Open it in an editor and change according to below:

                       <player id="FlashPlayer10.3" version="12" asversion="3">
             <name>Flash Player 10.3</name>
             <path builtin="true"/>
             <path platform="WIN">Device Central/adcdl.exe</path>
             <path platform="MAC">Device Central/adcdl</path>
             <playerDefinitionPath as2="$(UserConfig)/Classes/FP10;$(UserConfig)/Classes/FP9;$(UserConfig)/Classes/FP8;$(Use rConfig)/Classes/FP7" as3="$(AppConfig)/ActionScript 3.0/FP10.3/playerglobal.swc" />


          Step 8: Close the flash application if launched and restart the flash application.

          Step 9: If you promptly followed everything you will Flash player 10.3 in the target players from the publish settings and change your target to flash player 10.3.

          Step 10: Now import two statements:


                    import flash.media.Microphone;
                    import flash.media.MicrophoneEnhancedMode;


          Hope you get the MicrophoneEnhancedMode from the list.

          • 2. Re: getEnhancedMicrophone()
            Alberto Moro Level 1

            I'll follow your instruction step by step. Hope it will work


            Just another thing: if I compile my flash application with flash player 10.3 and I upload my application on the web, do all the users need to upgrade their own flash player?


            Theoretically, they should, right?




            • 3. Re: getEnhancedMicrophone()
              relaxatraja Level 5

              Yes, the flash player should be updated for the browsers otherwise error will thrown.

              • 4. Re: getEnhancedMicrophone()


                Just for testing I write a very simple code and I get

                          "Error #1006: getEnhancedMicrophone is not a function."


                What I have done::

                • Added the  playerglobal FP11 (Beta) in C:\Program Files\Adobe\Adobe Flash CS5\Common\Configuration\ActionScript 3.0\FP11
                • Added a new config FP11.xml with ten parameters for FP11.
                • Get Flex SDK 4.5 and added the core.swc path in AS Settings panel in Flash.
                • I get the flashplayer 11 option in  Publish Settings.
                • I get the intellisens option for Micrphone.getEnhancedMode and MicrophoneEnhancedMode. So I know the classes are there.

                The code


                import flash.media.MicrophoneEnhancedMode;
                import flash.media.Microphone;
                import flash.net.NetConnection;
                import flash.events.NetStatusEvent;

                var nc:NetConnection = new NetConnection();
                nc.connect( "rtmp://localhost/ssnetstream/test1");
                var microphone:Microphone = Microphone.getEnhancedMicrophone();

                function onNetStatus(e:NetStatusEvent):void {
                     var code:String = e.info.code;
                         switch (code) {
                         case "NetConnection.Connect.Success" :
                             var netStream:NetStream = new NetStream(nc);
                         case "NetStream.Publish.Start" :
                             // sendMetadata();
                         case "NetConnection.Connect.Failed" :
                         case "NetConnection.Connect.Rejected" :


                I guess the problem can be the compiler.

                I worked as you se, just in Flash CS5 for this test. I hope one of Adobe's gurus can give an answer ;).

                Any suggestions?

                • 5. Re: getEnhancedMicrophone()
                  Mr_Vertigo_2010 Level 1

                  Well. After further testing I found that the error is generated only in the flash IDE ( the player for flash?) . I added a try-Catch statement for checking for Microphone.EnhancedMode  and published. The browser with FP11. recognized the Microphone.EnhancedMode without problem. I just wonder which and where is the player Flash uses when testing internal ( (crtl+Shift). Is it the debugger in C:\Program Files (x86)\Adobe\Adobe Flash CS5\Players ? I will of course test it.

                  • 6. Re: getEnhancedMicrophone()

                    Hi -


                    Thanks for most straightfoward instructions I have yet to see. I too have CS5 and wish to use the enhanced Microphone capabilities. I was expecting that there would be a clear piece of documentation from Adobe about the process of updating playerglobal.swc and the swf version (and all the players, IDE included). But I have not managed to find anything. Is it really true that there isn't such a document? Or have I just missed it? This seems like a pretty basic and important process that ought to have an official document. Instead all I can find are various posts (most not nearly as clear as yours) and other cryptic (and often conflicting) references.


                    Please let me know if there is something out there that I have missed.