# Got a little problem with some sound script

**URL:** https://forum.kirupa.com/t/got-a-little-problem-with-some-sound-script/289607
**Category:** flash
**Created:** [June 2, 2009, 1:29pm UTC](https://forum.kirupa.com/t/got-a-little-problem-with-some-sound-script/289607 "2009-06-02T13:29:12Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Judda](https://avatars.discourse-cdn.com/v4/letter/j/a5b964/32.png) [@Judda](https://forum.kirupa.com/u/Judda)
#### Post date: [June 2, 2009, 1:29pm UTC](https://forum.kirupa.com/t/got-a-little-problem-with-some-sound-script/289607/1 "2009-06-02T13:29:12Z")

</div>

Can anyone see anything wrong with this sound script?

It should work and has worked but for some reason it does and it doesn’t which is kinda frustrating.

HERE’S THE SCRIPT:

allmicnames = Microphone.names;

active\_mic = Microphone.get();  
\_root.attachAudio(active\_mic);

active\_mic.onActivity = function() {  
\_root.onEnterFrame = function() {  
active\_mic.setGain(4);  
trace(active\_mic.activityLevel);  
mic\_level = active\_mic.activityLevel / 4;  
if (mic\_level \>= 20) {  
\_root.icesound.\_xscale += mic\_level;  
\_root.icesound.\_yscale += mic\_level;  
};  
};  
};
