Change the active microphone in AS3

Is there a way to change the active microphone in AS3 without using the SecurityPanel.MICROPHONE?  All of my attempts stop all microphone activity, even if triggered by a button click.
Using
var mic:Microphone = Microphone.getMicrophone();
works fine, them if at a later point I do
mic = Microphone.getMicrophone(newIndex);
and poll mic.activityLevel - the level is always -1.
If I switch back to the original mic, it works again, which ever was originally selected in the security panel works.  This is with two working mics, and I have switched which is selected via the security panel to make sure it is not mic specific.
Is this  a security risk and not allowed?  Once you initialize one mic, is that what you are stuck with?  I have switched cameras in air, but that was air.
- as a side note, the reason for needing this is we get feedback whenever a user is using the computer speakers and is on firefox.  I have set loopback to false and I have brought the SoundMixer level down to 0, but as soon as the security panel microphone window pops up, the level comes up and loopback acts as if it was set to true.  When the window closes, I get control again.

Figured it out.  It looks as though the Microphone.activityLevel is -1 until you add a SampleDataEvent listener.  You do not need to add this if you are streaming to the server.  In my tests I was updating my reference to the mic for checking the activityLevel in an update loop.  I did not update the SampleDataEvent lsitenre since I was not actaully recording, just checking the mic input level, and did not think it needed tobe in place.
It seams possible that the Microphone checks that it either has a SampleDataEvent listener, or is connected to a server before updating activityLevel, I just have never seen that kind of thing done.
I am not certain this is the case, but it is what it looks  like.  If anyone has more infomation, please share.

Similar Messages

  • Can I Programmatically Change the Active Group on a Hypertrend in DSC?

    I would like to know how to programmatically change the active group of a hypertrend in Labview DSC.  I saw a link which said it can be done in Lookout.  But in the DSC module, the active group is read only.
    I know of a hard way to do it.  I could save the hypertrend settings as xmlSettings to a temporary file.  The active group is one of the settings.  I could then change the active group in this text file to point to the new group and then reload the settings.  But this is not a clean way of dong it.
    Anyone know if there is a easy way?
    Solved!
    Go to Solution.

    I found a way to do it but its not very clean.  I dont know why there is not a function to change the current group.
    Here is how I did it.

  • Changing the Registration point via AS3 . how?

    hello,
    is it posseple to change the Registration point via AS3 ?
    Best Regards,
    Crimson

    The Attach Code window isn't working for me on this so I
    pasted the code into the message. Hope the formatting remains
    reasonable.
    public class HomePage extends MovieClip {
    public var frenchieReal:Swimmer; //Swimmer extends
    MovieClip; contains image of French Angel
    public var frenchie:Sprite; //To offset regisration point of
    frenchieReal
    public function loadStage() {
    var timer:Timer;
    var wayPoints:Array;
    //Establish timer for swimmers
    timer = new Timer(100, 0);
    //Create new swimmer supplying: image path, width, heigth,
    and initial x and y location
    frenchieReal = new Swimmer("Photoshop/oceanswimmer.png", 57,
    41, -24, -28);
    frenchie = new Sprite();
    frenchie.x = 244;
    frenchie.y = 532;
    this.addChild(frenchie);
    frenchie.addChild(frenchieReal);
    frenchieReal.setTimerListener(timer);
    //Set waypoints for swimmers
    wayPoints = [[230, 530],
    [240, 520],
    [250, 500],
    [260, 480],
    [298, 480],
    [358, 540],
    [368, 544],
    [388, 520],
    [398, 495],
    [404, 475],
    [420, 500],
    [458, 545],
    [528, 550]];
    frenchieReal.setPath(wayPoints);
    package {
    import flash.display.MovieClip;
    import flash.events.*;
    import flash.utils.Timer;
    import flash.net.*;
    import flash.display.*;
    public class Swimmer extends MovieClip {
    private var path:Array;
    private var pathLength:uint;
    private var pathLocation:int;
    private var loader:Loader;
    private var intercept:int;
    public function Swimmer(imagePath:String, w:uint, h:uint,
    xx:uint, yy:uint) {
    var urlRequest:URLRequest;
    this.x = xx; //Transaltion offsets for image MovieClip (eg,
    -24 and -28)
    this.y = yy; //Image is visible if these two values are
    nonnegative
    this.loader = new Loader();
    this.addChild(this.loader);
    urlRequest = new URLRequest(imagePath);
    if (urlRequest != null) this.loader.load(urlRequest);
    //Sets an array of waypoints
    public function setPath(p:Array) {
    this.path = p;
    this.pathLength = p.length;
    this.pathLocation = 1;
    this.parent.x = this.path[0][0];
    this.parent.y = this.path[0][1];
    this.intercept = -this.parent.y;
    public function setTimerListener(t:Timer):void {
    t.addEventListener(TimerEvent.TIMER, timerListener);
    //this.parent in timerListener is the Sprite object to which
    image MovieClip is parented
    function timerListener(e:TimerEvent):void {
    var i:int;
    var iMinus1:int;
    var xx:int;
    var y1:int;
    var y2:int;
    var rise:int;
    var run:int;
    var rotationAngle:int;
    if (this.path != null) {
    //Move to next segment?
    if (this.parent.x >= this.path[this.pathLocation][0]) {
    this.pathLocation++;
    //Go back to first segment?
    if (this.pathLocation == this.pathLength) {
    this.pathLocation = 1;
    this.parent.x = this.path[0][0];
    this.parent.y = this.path[0][1];
    this.intercept = -this.parent.y; //Minus y to translate
    everything to lower quadrant
    //y = ax + b
    //y = ((path
    [1] - path[i-1][1]) / (path[0] - path[i-1][0])) * this.x +
    path[i-1][1]
    i = this.pathLocation;
    iMinus1 = i - 1;
    this.parent.x += 2;
    xx = this.parent.x - this.path[iMinus1][0];
    y1 = -this.path[iMinus1][1];
    y2 = -this.path
    [1];
    rise = y2 - y1;
    run = this.path[0] - this.path[iMinus1][0];
    this.parent.y = ((y2 - y1) / (this.path
    [0] - this.path[iMinus1][0])) * xx + intercept;
    this.parent.y = -this.parent.y;
    rotationAngle = -(180/Math.PI) * Math.atan2(rise, run);
    this.parent.rotation = rotationAngle;
    trace("rise = " + rise + " run = " + run + " rotationAngle =
    " + rotationAngle + " Intercept = " + this.intercept);
    trace("x = " + this.parent.x + " y = " + this.parent.y + "
    rotation = " + this.parent.rotation);

  • How can I change the active iCloud account in my Mac

    My doughter set up the cloud in my mac, but she used her apple id. Now I cannot change the icloud active account from hers to mine. What can I do?

    Click the apple >> system preferences >> iCloud >> sign out.  Then sign back in with the desired apple id.  Some data will be removed when you sign out.  You can export data you want to keep first, sign out, then reimport.  If it's just your daughter's info, then this probably won't matter to you.

  • No redetermination of organizational data when change the activity partner

    In the Business Activity we have the determination Rule for Org.Data Model "14000161 - Org. Data Re. Master Data".
    When we create a Business activity and enter the activity partner, the organizational data is determinated correctly.
    The problem is that, when the activity partner is changed, the organizational data not is redetermined.
    Anybody Knows how to do it?
    Thanks.
    Best regards,
    Dani Sevilla.

    Hi Daniel,
    Did you try "propose alternative"?
    you can read at http://help.sap.com/saphelp_crm40sr1/helpdata/en/82/adc9531f1bc5419d0785617d6a59c2/frameset.htm
    also the BAdI mentioned can help you.
    Eyal.

  • Allow users to change the Active Target Category in the POV bar

    Can't figure out where in Object Maintenace to allow user to be able to select the Active Target Category in the POV bar.

    It's not in object maintenance. You need to disable the POV Mode (Admin / POV Mode) by removing the checkbox, iwhich then means all users will have the ability to change the category (and period). I suspect in the POV it currently has GLOBAL defined ( which means it is controlled by admin users, and you need to switch it (by default) to LOCAL via the POV Mode option.

  • What is the right way to change the active JInternalFrame for and MDI app?

    I am working on my own implementation of the window menu. The action that is triggered when a customer chooses a window to activate from the list in the menu is not behaving as I expected. The code I wrote (below) switches frames correctly but the caption bar never gets updated and if you restore a frame from an icon the frame is not correctly activated, there is even a restore button which if you push fixes things up and the frame then behaves normally     if (frameToActivate.isIcon ())  {
              //  Restore from icon
              desktopPane().getDesktopManager().deiconifyFrame (frameToActivate);
         desktopPane().getDesktopManager().activateFrame (frameToActivate);
         desktopPane().setSelectedFrame (frameToActivate);I did a search of the web and found a tip on JavaWorld (http://www.javaworld.com/javaworld/jw-05-2001/jw-0525-mdi.html) which led me to try doing this from a different angle - the JInternalFrame's point of view. This code works     try {
              if (frameToActivate.isIcon ())  {
                   //  Restore from icon
                   frameToActivate.setIcon (false);
              frameToActivate.moveToFront();
              frameToActivate.setSelected (true);
         } catch (PropertyVetoException error) {
              error.printStackTrace();
         }My question is why does the desktop based approach not work? If methods exist that appear to let you restore and switch between frames why are the ineffective? Am I missing something obvious that I should be doing?
    If using the JInternalFrame methods is the right way to go then I will It just seems like if the DesktopManager has methods that advertise that is supports managing the active frame then they should work. Before I ignore them I want to check with you to see if there is a right way to use them.
    Ian

    So, this is another batch of duke dollars I cannot assign - since I solved my own problem:-)
    I had an epiphany and tried setting break points to see what code was executed when you click on an inactive frame. From that I determined that DefaultDesktopManager.activateFrame, as implemented, does not activate the frame but acknowledges the activation of a frame and does a small amount of bookeeping work for the DesktopManager. So, the solution is the code I wrote to switch focus using the JInternalFrame's methods. Since I did not want to have to write those nine lines of code in the couple of places I want to programmatically switch the active frame I added a get/setActiveFrame method to my JDesktopPane derivative. In case others face this problem here is the code (warning I have not yet setup building the JavaDocs for this project so I cannot vouch for the validity of the JavaDoc, but the code does work):/**
    * Bring frameToActivate to the front (restoring from icon if neccessary) and make it the
    * selected frame.  This method does all the things required to switch the active frame for
    * an MDI application unlike: @link JDesktopPane.setSelectedFrame, which does not change the
    * focus; @link javax.swing.DefaultDesktopManager.activateFrame which does not correctly
    * handle iconified frames or switch the focus properly; and
    * @link javax.swing.JInternalFramesetSelected which also does not handle iconified frames.
    * @param frameToActivate the frame to bring to the front and become the active window
    * @throws IllegalArgumentException
    public void setActiveFrame (JInternalFrame frameToActivate) throws IllegalArgumentException  {
        if (frameToActivate == null)
            throw new IllegalArgumentException ("setActiveFrame a frame must be passed a non null valie.");
        try {
            if (frameToActivate.isIcon ())  {
                //  Restore from icon
                frameToActivate.setIcon (false);
            frameToActivate.moveToFront();
            frameToActivate.setSelected (true);
        } catch (PropertyVetoException error) {
    * This method returns the currently active frame.  This method returns the same frame
    * as <code>getSelectedFrame</code> and is provided for symetry for <code>setActiveFrame</code>. 
    * @return the currently active frame
    * @see LDesktopPane.setActiveFrame
    * @see javax.swing.JDesktopPane.getSelectedFrame
    public JInternalFrame getActiveFrame ()  {
        return getSelectedFrame ();
    }IL

  • How to change the active tab label

    Hi, I want to change the style of the active tab canvas label (bold). I can change this property in the forms builder , but when I run the form in web I see the active tab label like the others. Why does it happen? How can I get this property in web?
    Thank you

    Hi,
    without having investigated into the issue you mention, what about showing the active tab with all letters in uppercase and the inactive tabs with mixed case ?
    Frank

  • How can I change the active Midlet using the '*' cell phone button

    Hello
    I've got a problem trying to do that in J2ME MIDP:
    'I have different class extending Midlet that I want to display one after the other. The change may be done when I click the '*' button of my cell phone'
    For the moment I've created a main class that extend Canvas and which contain a vector of objects extending Midlet.
    I'm able to change the objet which I want to display, but not to display it....
    Is it possible to do that?
    Do you have any idea of how to deal with that?
    Thanks a lot...

    Hello
    Thx for your answer .. but I shouldn't have explain correctly my problem because I don't think this answer it .. sorry
    I need an interaction between a Midlet class and a Canvas class.
    In fact I have several forms, and I need to allow my Canvas class to change the form displayed when a button is pressed.
    But If I have a form in a Midlet , I can display it but can't catch the click on a button.
    And if my Canvas is displayed I don't know how to display the form I want to.
    So is it possible to do that... and if so, how?
    Thank you very much...
    Al161084
    Message was edited by:
    al161084.1

  • How can I change the active session?

    How can I change session in the pre report trigger, to connect to another session wich has uncommited data, that I want to see in the report?

    Click the apple >> system preferences >> iCloud >> sign out.  Then sign back in with the desired apple id.  Some data will be removed when you sign out.  You can export data you want to keep first, sign out, then reimport.  If it's just your daughter's info, then this probably won't matter to you.

  • While Updating Item master 1250000088 - Date ranges overlap; change the active or inactive date range

    hi.
    i am updating item master.
    just i am trying to update to inactive from active
    i allready given the date ranges
    but above error is comming..
            Dim vItem As SAPbobsCOM.Items
                        Dim RetVal As Long
                        Dim ErrCode As Long
                        Dim ErrMsg As String
                        vItem = ocompany.GetBusinessObject(BoObjectTypes.oItems)
                        'Retrieve a record by its key from the database
                        RetVal = vItem.GetByKey(Icode)
                        '' vItem.UserFields.Fields.Item("U_Status").Value = "Sold"
                        vItem.Frozen = BoYesNoEnum.tYES
                        vItem.FrozenFrom = "09/02/2014"
                        vItem.FrozenTo = "09/02/2014"

    hi.
    Thanks for your reply..
    overlapping ..means
         'Retrieve a record by its key from the database
                        RetVal = vItem.GetByKey(Icode)
                        '' vItem.UserFields.Fields.Item("U_Status").Value = "Sold"
                        vItem.Frozen = BoYesNoEnum.tYES
                        vItem.FrozenFrom = "09/02/2014"
                        vItem.FrozenTo = "09/02/2014"
        vItem.FrozenFrom = "09/02/2014"
          vItem.FrozenTo = "10/02/2014"
    i all ready tried  above  two ways.. given date same and given two  diff dates....
    but the same Error is comming..
    Any info.plz update me..

  • TS3376 On the iphone 4s i am having trouble changing the activation sign in because it is on my fathers and he does not know the password to it so i want to put it on my apple ID but i do now know how

    I need help as soon as possible

    The Apple ID and Password that was Originally used to Activate the iDevice is required.
    Activation Lock in iOS 7  >  http://support.apple.com/kb/HT5818
    There is No workaround.

  • Changing the active JRE version between several available paths

    Hello, I need help with a rather risque subject.
    I know it isn't recommended, or preferable, but I need to upgrade the Java on a server that has to be maintained at as close to 100% availability as possible. Now, I can allow for the post-upgrade reboot time, but I can't afford to have the server be up, but none of the programs working because of the switch in java for any extended length of time.
    For this reason, I need to know how I can switch between versions which are installed in different directories (be it via registry or anything else).
    There must be some way to do this, and, tedious though it may be, I need to know it.
    Can anyone help?

    Now, I can allow for the post-upgrade reboot time, What is it? Why should the system be rebooted because a new program was installed? Is it vindoze?

  • Change the transaction status when creating a follow up activity

    Hello All
    We need to change the activity status if a follow up document is created from. E.g. If an activity is created type 001  then a follow-up activity type 003 as a follow up document from 001 the system automatically changes the activity status from open to in process. I need detailed steps regarding how to reach this
    Regards
    Jacopo

    See if you can "exploit" CRM_COPY_BADI and function modules CRM_STATUS_CHANGE_EXTERN to change the User status or CRM_STATUS_CHANGE_INTERN for System status.

  • How do I change the background color of a row in a table indicator?

    Hello,
      How do I change the background color of a row in a table indicator? I know how to change the background color in a active cell, but that is not what I want. My first intent is to make the background color of the first row a unique color, such as green, just to highlight the top row of the table.
    Regards,
    Kaspar
    Regards,
    Kaspar

    I have done this before by using a for loop to change the active cell of a row in order to give the appearance that the whole row is turning the color at once.
    CLA, CLED, CTD,CPI, LabVIEW Champion
    Platinum Alliance Partner
    Senior Engineer
    Using LV 2013, 2012
    Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.

Maybe you are looking for

  • How do i delete a contacts sub folder from my iphone?

    How do i delete a contacts sub folder from my iPhone?

  • Which VNC program should I use to remotely connect to my Mac?

    I have attempted to use both RealVNC Viewer and TightVNC. I have set up "Screen sharing" within Leopard and ensured that in the "Security" settings in System Preferences that "allow all incoming connections" is checked. I have also ensured that port

  • Prime Infrastructure 1.4 + AVC

    Hi, can somebody help me how to make AVC statistics running in PI 1.4? I've installed assurance license with 50 devices, set monitor and exporter on WLC (running version 7.6) but still I cannot see any application statistics under Detail Dashboards.

  • HP 15-n086sl problems with windows and drivers amd

    Hello to all, I have a problem with my HP 15 - n086sl . With native Windows 8 did not. the problem is the following : moving from windows 8 to 8.1 I lose the switch graphics cards. I mean : if I click with the mouse on "configure switchable graphics

  • Function module for  includes

    Is there any function module which would return all the includes name in the submitted program?