How do i create a sound equalizer?

i wanna create a realistic sound equalizer for my flash!

this sound equalizer you can see from winamp or windows media player
which has bars going up and down following to the beat of the music

however, its impossible to make it beat with the rhythm, so i just wanna
create a fake one but look real, can someone teach me?

i wanna use it for my music on/off button