problems using an example of micro

Hello

I am interested to work with mic in my Flex project, but I have problems just getting started with it because I can't make even a basic example of work!

Here is the example:

http://livedocs.Adobe.com/Flex/3/HTML/Help.HTML?content=Working_with_Sound_16.html

And here's what I did:

<? XML version = "1.0" encoding = "utf-8"? >
" < = xmlns:mx mx:Application ' http://www.Adobe.com/2006/MXML "layout ="absolute"> "

< mx:Script >
<! [CDATA]

import flash.media.Microphone;

var mic:Microphone = Microphone.getMicrophone ();
mic.addEventListener (StatusEvent.STATUS, this.onMicStatus);

function onMicStatus(event:StatusEvent):void
{
If (event.code is "Microphone.Unmuted")
{
trace ("microphone access was allowed.");
}
Else if (event.code == "Microphone.Muted")
{
trace ("microphone access denied.");
}
}

[]] >
< / mx:Script >

< / mx:Application >

This is the error I get:

"The this keyword can not be used in static methods. It can only be used in instance methods, function closures and the global code.  "

I would appreciate if someone could show me how to go with it. Thank you!

Try this.

http://www.Adobe.com/2006/mxml"layout ="absolute ".

creationComplete = "init (); »

>

import flash.media.Microphone;

private var mic:Microphone;

private function init (): void

{

MIC = Microphone.getMicrophone ();

mic.addEventListener (StatusEvent.STATUS, onMicStatus);

}

private void onMicStatus(event:StatusEvent):void

{

If (event.code is "Microphone.Unmuted")

{

trace ("microphone access was allowed.");

}

Else if (event.code == "Microphone.Muted")

{

trace ("microphone access denied.");

}

}

]]>

BaBo,

Tags: Flex

Similar Questions

  • Problems using a vi countdown

    Hi all.  We use a state machine that has a delay timer in one of the States.  In the State with the delayed start, we want to display a countdown which passes from the start time to 0.  We use the example of CountDown.VI vi to do the count.

    The problem is that we are not able to pass the value of the vi of countdown counting to the façade of our main vi.  Even if we use a connector component to connect the output of countdown.vi to an indicator on our façade, the indicator shows only a single value.

    We used two probes to look for problems.  A probe on the Countdown.vi, the other probe is on our main vi.   The Countdown.vi probe is on the wire goes to the control that is located on countdown.vi.  The main vi probe is on the wire coming from the CountDown.vi of our indicator.  We see that the countdown.vi probe is exhausted, one would expect, but the probe on our main vi only displays a single value that never changes.

    Find us the problem it's because of the While loop in Countdown.vi, but we do not know how to get there.  Is it possible to change the current value of the CountDown.vi to our front rather than just the value of a?

    Thank you.

    The problem is that the data are not available from your countdown to the end of execution. This is how all SubVIs work and it's a very good thing because you don't want your program to continue to run away while your countdown will (in this case).

    You have two options.

    (1) as RTSLVU showed you, do not use a Subvi to your timer, but put it directly in the hand of VI.

    (2) open the Panel front of the Subvi during its execution. The timer will be in another window, however, I don't know if this is desired.

    (3) pass a reference to your front panel indicator in the Subvi. Then, inside your Subvi (countdown), you can write to the indicator using a property node.

    (4) similar to the #2, you can use a secondary to display your Subvi on the main VI.

    I think #3 will be easier for you, I'll see an example if I have the time.

  • What license governs the use of examples OR officials?

    Hello

    What license governs the use of examples OR officials (help-> find examples...)? Am I allowed to copy + paste the pieces in my own code?

    There is problems using examples in your own code assumes that you have a valid license of LV.

  • I use hp 3330 pro Micro tower PC, I need graphics &amp; Lan Driver for Windows 7

    Hello Sir,

    I use hp 3330 pro Micro tower PC, I need graphics & Lan Driver for Windows 7 32 bit. I need Intel HD graphics driver for my pc. I feel my modem internet connection problem. Please help me.

    Hello

    What is the version of your Windows 7? Please use the following link:

    http://h20565.www2.HP.com/portal/site/hpsc/template.page/public/PSI/swdHome?sp4ts.Oid=5160082&AC.admitted=1407043917089.876444892.492883150

    Kind regards.

  • Problem using the REST API by wavemaker

    Hello

    I have a problem using other api with wavemaker. When I do a query GET with the RESTClientin FireFox, everything is fine for example:

    get https://XXX.XXX.XXX.XXX:8281 / vco/api/result:

    1. Status Code: 200 OK
    2. Cache-Control: private
    3. Content-Type: application/xhtml+xml;charset=UTF-8
    4. Date: Sun, 06 Apr 2014 16:50:04 GMT
    5. Expires: Thu, 01 Jan 1970 00:00:00 UTC
    6. Server: Apache-Coyote/1.1
    7. Transfer-Encoding: chunked

    But when I try to connect to the same url using wavemaker I recive: the answer is not in a valid XML Format.

    I use Orchestrator 5.5 and far as I could see the token is no longer required in the header. Anyone know why I get this error message?

    Thank you!

    Well half a day looking, then finally I thought to it:

    The header should be: accept: application/xml

  • Problem using RANK() over (partition of)

    Hello

    I have a select statement that selects a single record among the many recordings sorted by date!

    SELECT the isin code, id, mkt, CTL, TM

    Of

    (SELECT isin, id, mkt, CTL, TM,

    Rank() OVER (partition by isin arrested by ASC TM) RNK

    CORD)

    where "CPOS" = id

    and "SSEFN" = mkt

    AND rnk = 1

    By this statement, I will get a single record (rnk = 1 so it select the first record)

    But the problem is that whenever there is only one record (qualifying) it does not appear in the result set.

    And I also need this record! My goal is always a single record , no matter how they are!

    I joined record a sample and also the script table here!

    SE0001ACPCNESSSSS2013-04-16 06:55:37
    SE0005ACPCNESSSSS2013-11-04 06:57:16

    CREATE TABLE cord

    (

    ISIN VARCHAR2 (13 BYTE) NOT NULL,

    ID VARCHAR2 (33 BYTE),

    VARCHAR2 (20 BYTE) TM,

    TMMILL NUMBER (13).

    TMMILLREC NUMBER (13).

    VARCHAR2 (49 BYTE) NM,

    MKT VARCHAR2 (11 BYTE) NOT NULL,

    CTL VARCHAR2 (4 BYTE)

    )

    ;

    Hello

    Louis wrote:

    Hello

    I have a select statement that selects a single record among the many recordings sorted by the timestamp!

    Whenever you have a problem, post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and the results desired from these data.
    Explain, using specific examples, how you get these results from these data.
    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum: https://forums.oracle.com/message/9362002

    Remember, RANK may return the same value for multiple lines in the same partition.

    If you have exactly 1 for each value in each partition, use ROW_NUMBER instead of RANK.

  • Someone at - he will meet similar problem using TextFieldAutoSize.CENTER and \n?

    Someone at - he will meet similar problem using TextFieldAutoSize.CENTER and \n?

    The following works as expected except that the text does NOT Center. He left aligned. I JUST also tried, but nothing helped. It is probably simple, but I rewrote the text and made the examples in the manual. Line with the numbers that it defines the width of the text box, but not the other centre of lines like I hoped.

    public void LessonPlan (): void {}
    var lessontext:TextField = new TextField();
    lessontext.autoSize = TextFieldAutoSize.CENTER;
    lessontext. Text = "only these \n Keys\nDo Something\nreturn/enter\n <>--\n0 1 2 3 4 5 6 7 8 9";
    lessontext.x = 500;
    lessontext.y = 10;
    lessontext. Background = true;
    lessontext. Border = true;
    var format: TextFormat = new TextFormat();
    format.font = "Verdana";
    format. Color = 0xFF0000;
    format. Size = 12;
    lessontext.setTextFormat (format);
    stage.addChild (lessontext);
    }

    Thanks in advance for a quick solution.

    Just add:
    format. Align = "center";
    for your work of TextFormat property.

  • Compaq Evo D5pM - problems using this model number, never find what he listed...

    Compaq Evo D5pM - (Pent4 - 1.7 GHz) problems using this model looking for parts or information number.  Serial number has not been useful.

    Someone said "aka Compaq D510." Trying to buy memory model (found on the case) my number wasn't so I tried to use D510 (it was listed). Apparently not the same computer / mine use 168 pins sticks and D - 510 came 188 pins. I did my 'upgrade' purchase by check the number of pins and using the already installed type.

    My computer is a vertical minitower - looks like D - 510-, but like I said the components are different.

    I was wondering if anyone knows a model Compaq Evo w / same components (P4 1.7 GHz; 168 pin memory) I could use for research purposes. The smallest horizontal model Evo often uses different (smaller) maps, etc..

    Tried the Ctrl-Alt-S keyboard shortcut to bring up the model number (etc.), but my keyboard shortcuts do not work on this computer. Run a search for edge came up with nothing to tune.

    I tried HP support and drivers.  With the help of several model numbers and found that absolutely nothing for HP Compaq or "Compaq" is in the list.

    It is a great 3rd computer that I've updated w / spare parts, use it remotely, especially for music. Only problem was the dark model number. If anyone has something useful to add would be most appreciated. Thanks in advance...

    PS I'm currently trying to identify MB for what it's worth, but a number of alternative model that works would be great.

    Hello:

    Your model is a d500 CMT HP.

    1 GB 128 x 64-133 MHz PC133, 168P DIMM, 3.3V, sync

    Type of memory: , (non - ECC)
    Maximum memory: 3 GB
    Slots: 3

    This is the page for support and drivers for your PC.

    http://h20566.www2.HP.com/portal/site/hpsc/public/PSI/home/?cc=us & lang = in & sp4ts. OID = 96294 & Task = & AC.admitted = 1389381517647.876444892.199480143

    QuickSpecs:

    http://h18000.www1.HP.com/products/QuickSpecs/productbulletin.html#spectype=North_America & type = HTML & docid = 10946

    Because nobody does more than the memory, it will be hard to find and very expensive.

    You can plan on paying more $ $70 / 1 GB chip if you do not find the specification above used on a place like eBay.

    You can buy a newer, faster CMT from HP on eBay for less than $70 delivered.  Memory is much cheaper to buy as well.

    http://www.eBay.com/ITM/HP-DC7600-Pentium-4-3-0GHz-40Gb-512MB-DVDRW-XPPRO-30-day-warranty-/281231108334?PT=Desktop_PCs & Hash = item417aae28ee

  • I have problems using the parental control. I want to block facebook from a user account. I have facebook in the ban list, but apparently not block. I have Vista. What should I do to block facebook?

    I have problems using parental controls. I want to block facebook from a user account. I have facebook in the ban list, but apparently not block. I have Vista. What should I do to block facebook?

    Have you followed all the steps like that?

    http://www.howtogeek.com/HOWTO/Windows-Vista/use-parental-controls-to-filter-websites-in-Windows-Vista/

    It is an alternative.

    http://explore.live.com/Windows-Live-Family-Safety?OS=other

    http://Windows.Microsoft.com/en-us/Windows-Vista/protecting-your-kids-with-family-safety

    If this post answers your question, click mark as answer .

  • unknown problem using WMP 12 no sound when played the song in the folder but has sound when he played in the player

    Hi all

    I have a weird problem using WMP (Windows Media Player v12).  When I double-click a song of in my library, the trail seems to play, but didn't have all the sounds.

    However, if I hover over the same path and then click Preview, the pop-up, the track plays with sound.

    When the track (s) do not play, all indications show the way to correctly play through of progress ' Now Playing ' screen, but no sound.

    In the past, when I clicked on any MP3 file, he would play using WMP.  Now, when I click on an MP3 file, it brings just "Now Playing" and looks LIKE he plays, but no sound.

    I have looked & looked for clues as to why it may be of WMP, but I can't understand the problem.  I also searched the Web for 'day' drivers in the Win System Manager, but Win says that pilots are "up to date".

    I have rebuilt the DB Library (twice) by removing the DB files in from WMP to a procedure in a WMP support forum. I also went to check the audio device in Device Mgr Win (mine is one on one). Everything seemed ok.  I also changed the devices to "Win by default" to what I think my onboard audio device is called.  I thought that that can do, but it's not.

    I was struggling with this since the day of the year.  Please help me solve this problem!

    Here is a link to my system features:

    http://Speccy.Piriform.com/results/0JAQshtlODwFxgwHeGb4rfq

    Hi, Pie,

    Welcome to the Microsoft community.

    Appreciate your efforts to try to resolve the problem that you have set so far. I guess that is not a problem with the driver that ultimately, the songs are playable using the media player. It could be a corrupted in Windows Media Player framework that is causing the problem. Let's run the Windows Media Player troubleshooting utility that resets all parameters to the player. Check out the link to do so:

    http://Windows.Microsoft.com/en-za/Windows7/open-the-Windows-Media-Player-settings-Troubleshooter

    Please let us know the results.

  • problems using the snap have amd, playback of Jpeg files

    Original title: I'm having problems using the component feature snap-in.

    Sometimes a single document disappears. When this happens while the document program is managed by then will not work. The document seems to be flying around the office. The last time this happened I had a doc JPEG upward and now I can't see what is JPEG. I don't know why the document wants to fly around, and I don't know how to get my use of the JPEG back.

    Hey Graham,.

    To view all jpeg images in the Viewer Windows photo or any other photo software visualization, you must configure this software as a default value in the default programs.

    Check out the link that allows you to configure the program as default.

    http://Windows.Microsoft.com/en-in/Windows7/change-which-programs-Windows-uses-by-default

    You can try to run the Aero Troubleshooter and see if that makes a difference.

    http://Windows.Microsoft.com/en-in/Windows7/open-the-Aero-Troubleshooter

    If the problem persists, provide us newspapers observer of events, as well as the error message if you receive a message.

    http://Windows.Microsoft.com/en-in/Windows7/open-Event-Viewer

  • I'm having a problem using the slideshow module in LR 6.3. The slideshow contains the background image as one of the images to display. Earlier, I had created a slideshow of practice and the background image was not displayed as an image in itself. How to

    I'm having a problem using the slideshow module in LR 6.3. The slideshow contains the background image as one of the images to display. Earlier, I have created a slideshow of practice and the background image was not displayed as an image in itself. How to make it behave?

    Another approach, perhaps a little more elegant (?). Create a collection that includes images for the slideshow. Include the background image in the collection. Drag the background image in the Panel to designate. Then, remove this image from the collection and create the slide show. I just tried and it works, too.

  • Are there problems using Adobe CC with 10 Windows?

    Are there problems using Adobe CC with 10 Windows?

    Hi Michael,

    This might be useful: https://helpx.adobe.com/creative-cloud/kb/Windows_10_compatibility_FAQ.html

    Kind regards

    Sheena

  • Problems using preset animations of the bridge

    Hi all

    Use the CC range and recently had a new problem using the animation preset from Adobe Bridge. I am in After Effects as usual and then go to the animation drop-down menu, click on Browse recent presets to open the bridge, and then as a use normal bridge to select the preset I want. Double click it while emphasizing my piece selected in AE, and AE then says this:

    Screen Shot 2014-11-17 at 11.33.52.png

    And even error codes no matter what effect/animation I choose, if his image, video or text.

    If I just go a little in AE, my recent animation preset and choose one of there it loads up absolutely perfect. But it's embarrassing massively.  Any ideas? This problem appeared out of nowhere.

    This is fixed in the 2014.2 effects after update (13.2), which is now available.

    Details here: http://adobe.ly/1IVopxh

  • Problem using friendly URLS SE

    Someone at - he had problems using the URL search engine friendly and css? I have a page which seems fine when I go to the page with the following url: http://localhost/demo/index.cfm. However if I change the url to http://localhost/demo/index.cfm/about-our-company the page behaves as if the css style sheet is not found. I'm totally clueless as to what could be the cause. Someone has an idea? I would really appreciate it!

    Thank you

    Jason

    Must have been some kind of problem with cache bug or something. I put all css links and all links to the absolute image links ( http://localhost/demo/styles/style.css). After coming back to it starts to work. don't understand, but the url can be a/search-engine-friendly-parameter after it and the page appears correctly.

    Thanks to Stressed_Simon and Ray Camden for pointing me in the right direction!

    Jason

Maybe you are looking for

  • The Java plugin does not appear in the Plugins tab

    The machine is a SLES11 running on x86_64 architecture. Firefox is 3.0.6 (from the installation of SLES11 DVD) version.I installed the jre-6u25 under/usr/java.I restarted Firefox after installation.No Java plugin is available under Tools/Add-ons/Plug

  • the CDRW would connect with the Gracenote server during extraction of CD?

    I use an old 6 x 4 x 6 (2001) CDRW on my iMac for my iTunes cd Ripper. I have a problem with the information on the transfer of (artist, song, album) cd from the Gracenote server. The external CDRW would prevent somehow information that reach the ser

  • Change the background color of comments in numbers?

    Is it possible to change the background color of comments in a document of numbers? I couldn't find a way to do it on my iMac, but I managed to change the color of comments in a document of iCloud numbers, and now he's changed the background color of

  • Why USB load Manager works on V5-571p-6454?

    I want to be able to load connect USB 3.0 devices while the computer is in hibernation or stop. I understand that this can be done only if Acer USB load Manager is installed. I downloaded and tried to install this application by running Setup.exe onl

  • Where are the Windows Vista Gadgets

    Hello: Microsoft used to have a link with a lot of downloadable gadgets for Windows Vista. I'm not finding it more. Is there a link (internal or external to Microsoft) who has "trust worthy" gadgets for download? Thank you DaleB