Got a little problem with some sound script

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;
};
};
};