# \[FMX2004\] Interactive Sound

**URL:** <https://forum.kirupa.com/t/fmx2004-interactive-sound/152028>\
**Category:** flash\
**Created:** [June 20, 2005, 6:10pm UTC](https://forum.kirupa.com/t/fmx2004-interactive-sound/152028 "2005-06-20T18:10:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jcrash](https://avatars.discourse-cdn.com/v4/letter/j/a698b9/32.png) [@jcrash](https://forum.kirupa.com/u/jcrash)\
**Post date:** [June 20, 2005, 6:10pm UTC](https://forum.kirupa.com/t/fmx2004-interactive-sound/152028/1 "2005-06-20T18:10:18Z")

</div>

Well, Ok I jacked a script from a vid tutorial I was looking at and tried just to see if it woork because it was a cool idea. The would seem to work; which is have the levels from the mic in, control shapes and alpha and movement of objects by reading the levels. For some reason it just isn’t working on mine… I’m not sure if it’s my mic line-in or that I messed somtehing up with the code or the file. If someone could take a look that would be great.

s = new Sound(this);  
s.setVolume(0);  
mic = Microphone.get(0);  
this.attachAudio(mic);

stop();  
// init variables

// xpos = x position of circle  
xPos = 0;  
yPos = 0;  
// inc - amt of increment  
inc = 10;  
// counter  
count = 1;  
// xlimit = max amount box xan be put in x axis  
xLimit = stage.width  
yLimit = stage.height

function addCircle () {  
this.attachMovie(“circle”, “circle” + count, count);  
mcObj = this[“circle” + count];  
//position circle  
mcObj.\_x = xPos;  
mcObj.\_y = yPos;

```
// get sound level
level = mic.activityLevel;
// plays to level frame #
mcObj.gotoAndStop(level);
//scale it
mcObj._xscale = level * 10
mcObj._yscale = level * 10
//rotate it
mcObj._rotation = (360/100) * level;
mcObj._alpha = level + 10;
//increment position
xPos += inc;
yPos = level * Math.random(10)
// drop down a row if over x limit

if (xPos&gt; xLimit) {
	xPos = 0;
}
if (yPos &gt; yLimit) {
	yPos = 0;
}
count++;

```

}

stop();
