1 Reply Latest reply on May 24, 2008 11:47 AM by donald_paris

    Setting pan on microphone object

    donald_paris
      Hi,

      I can't make the pan of a microphone object work. Although i am trying to reproduce what is specified in adobe's documentation.

      It should put all the sound into one speaker only, but it has no effect at all, whatever value i'm using as Pan.
      Can anyone help me with this issue please ?

      Here is my code : (AS3 Flash player 9 compatibility)

      quote:

      import flash.display.Sprite;
      import flash.events.*;
      import flash.media.Microphone;
      import flash.system.Security;
      import flash.system.SecurityPanel;

      function MicrophoneExample() {
      var parms:Object = loaderInfo.parameters;
      var mic:Microphone = Microphone.getMicrophone(0);
      // Security.showSettings(SecurityPanel.MICROPHONE);
      mic.rate=44;
      mic.gain=50;
      mic.setUseEchoSuppression(true);
      var transform1:SoundTransform = mic.soundTransform;
      transform1.pan = 1;
      // transform1.volume = 0.7;
      mic.soundTransform = transform1;
      mic.setLoopBack(true);
      trace(mic.soundTransform.pan); // I can see here that pan value is recorded... But it has no effect :(
      }

      MicrophoneExample();


      Here is my swf file so you can see that it doesn't work. You will need a microphone and a head set plugged in to avoid echo.

      http://poesies.free.fr/fm.swf

      Thank you.