# Store sound level

**URL:** <https://forum.kirupa.com/t/store-sound-level/261977>\
**Category:** flash\
**Created:** [June 2, 2008, 10:53am UTC](https://forum.kirupa.com/t/store-sound-level/261977 "2008-06-02T10:53:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![toast](https://avatars.discourse-cdn.com/v4/letter/t/6f9a4e/32.png) [@toast](https://forum.kirupa.com/u/toast)\
**Post date:** [June 2, 2008, 10:53am UTC](https://forum.kirupa.com/t/store-sound-level/261977/1 "2008-06-02T10:53:09Z")

</div>

Hi,  
I’m trying to develop a game that will use sound to move an mc. I want to be able to store where the level of the sound bar is after 3 seconds. Depending on how loud the player shouts the more power they will get.

This is what I have so far:

// set up microphone object  
\_root.createEmptyMovieClip(“myAudio”, 1001);  
\_root.myAudio.attachAudio(Microphone.get());  
\_root.myMic = Microphone.get();

// set up Interval to listen for microphone levels  
micInterval=setInterval(function() {  
// update mic level  
\_root.micLevel.bar.\_xscale=\_root.myMic.activityLevel;

Just not sure on where to go from here. I tried searching the forums, but I’m not sure what to look for. Thanks in advance for any help.

---

<div class="post-metadata">

**Author:** ![randomagain](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@randomagain](https://forum.kirupa.com/u/randomagain)\
**Post date:** [June 2, 2008, 11:06am UTC](https://forum.kirupa.com/t/store-sound-level/261977/2 "2008-06-02T11:06:24Z")

</div>

try other sites for tutorials, I have seen one somewhere.

[gotoandlearn.com](http://gotoandlearn.com)  
spehoirte? – some final-fantasy character’s name.  
green sock?  
scenaular? – always spell that one wrong

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 2, 2008, 1:25pm UTC](https://forum.kirupa.com/t/store-sound-level/261977/3 "2008-06-02T13:25:01Z")

</div>

Hey, here’s a great tutorial to help you out! It doesn’t do exactly what you want, but I’m sure it I’ll give you a big head start: [tutorial](http://www.kirupa.com/developer/actionscript/microphone.htm).

---

<div class="post-metadata">

**Author:** ![toast](https://avatars.discourse-cdn.com/v4/letter/t/6f9a4e/32.png) [@toast](https://forum.kirupa.com/u/toast)\
**Post date:** [June 4, 2008, 12:14pm UTC](https://forum.kirupa.com/t/store-sound-level/261977/4 "2008-06-04T12:14:47Z")

</div>

[QUOTE=randomagain;2334696]try other sites for tutorials, I have seen one somewhere.

[gotoandlearn.com](http://gotoandlearn.com)  
spehoirte? – some final-fantasy character’s name.  
green sock?  
scenaular? – always spell that one wrong[/QUOTE]

Thanks! I’ll post the solution when I find it.
