Quantcast
Channel: Adobe Community : All Content - All Communities
Viewing all articles
Browse latest Browse all 290743

Microphone in AS3

$
0
0

Hey everyone,

 

After looking around for tutorials on how to use a microphone in flash, I found a guide on the adobe website which was really useful.  Is there a way that I can get what users are saying to the program then act on their words to do things that are set in the program?   For example, I have a sequare and want users to control it. So  saying "up" will move it up.  On FRME_ENTER event, the code below is called, the problem with this is that the variable keeps going down by 2 which is understanble because I set it to decrease by 2. I do not want the function to act as an infinite loop. It looks like the function  is acting like one.

 

 

          var claps = 0;

        var isclapping = false;

 

        public function readMic(e:Event) {

 

            if(mic.activityLevel >= 20 && isclapping == false) {

                claps += 6;

                isclapping = true;

 

            } else {

                claps -= 2

                isclapping = false;       

            }

 

        }

 

 

How do I stop the echo sound in the background?


Viewing all articles
Browse latest Browse all 290743

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>