PDA

View Full Version : Microphone?


shkoyach
08-13-2009, 07:43 AM
Okay.

I originally found this online.
http://www.kirupa.com/developer/actionscript/microphone.htm

Basically what I'm looking for is this script:

m = Microphone.get();
attachAudio(m);
m.setUseEchoSuppression(false);
onEnterFrame = function () {

circle._xscale = circle._yscale = m.activityLevel+50;

};

EXCEPT that instead of scaling, I need the mic level to affect what frame is being shown.(Circle is a graphic symbol)

If miclevel is >10 and <30 then it should gotoandstop frame 2 of circle
If miclevel is >29 and <75 then it should gotoandstop frame 3 of circle
If miclevel is >74 then it should gotoandstop frame 4 of circle
otherwise circle should be on frame 1.

Can someone please plug this idea into this code? I would REALLY be grateful!