# Problem with equalizer

**URL:** <https://forum.kirupa.com/t/problem-with-equalizer/321413>\
**Category:** flash\
**Created:** [April 19, 2011, 9:59am UTC](https://forum.kirupa.com/t/problem-with-equalizer/321413 "2011-04-19T09:59:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ukspursbloke](https://avatars.discourse-cdn.com/v4/letter/u/bc8723/32.png) [@ukspursbloke](https://forum.kirupa.com/u/ukspursbloke)\
**Post date:** [April 19, 2011, 9:59am UTC](https://forum.kirupa.com/t/problem-with-equalizer/321413/1 "2011-04-19T09:59:26Z")

</div>

Hey, I’m creating an mp3 player with playlist, equalizer etc.

I’ve worked with an equalizer before, however I want this equalizer to display outside of the playlist movie clip where all the track information is stored.

So this is my code:

```auto
addEventListener(Event.ENTER_FRAME, onEnterFrame);
function onEnterFrame(event:Event):void {
 // ANIMATED EQ BARS CODE
    eqBarLeft1.gotoAndStop (Math.round(MovieClip(root).wholenano.tracks.sndChannel.leftPeak * 10) );
    eqBarRight1.gotoAndStop (Math.round(MovieClip(root).wholenano.tracks.sndChannel.rightPeak * 8) );
    eqBarLeft2.gotoAndStop (Math.round(MovieClip(root).wholenano.tracks.sndChannel.leftPeak * 7) );
    eqBarRight2.gotoAndStop (Math.round(MovieClip(root).wholenano.tracks.sndChannel.rightPeak * 7) );
    eqBarLeft3.gotoAndStop (Math.round(MovieClip(root).wholenano.tracks.sndChannel.leftPeak * 8) );
    eqBarRight3.gotoAndStop (Math.round(MovieClip(root).wholenano.tracks.sndChannel.rightPeak * 10) );
}

```

The song information is stored in the tracks movie clip under the sndChannel - which I believe the script is locating correctly (I know this because if I change it slightly I get undefined sndChannel errors).

However I get an:

**A term is undefined and has no properties.**  
**at nano\_fla::equalizer\_22/onEnterFrame()**

error. So something is wrong with the onEnterFrame event. I’ve tried removing this but I then get a slightly different undefined error.

Any help would be much appreciated, thanks!
