Skip to main content
Inspiring
December 24, 2011
Question

Change movieclip._alpha depending on volume output of music

  • December 24, 2011
  • 1 reply
  • 448 views

Not asking how to change the volume, asking how to detect the actual volume (not the set 100 volume) of music/sounds. I wouldn't even know where to look, anyone have any idea? does flash even detect the actual volume output? So when the volume is 0 (e.g. maybe at the end of a song) the ._alpha is 0, so all I need is a variable for the output volume of a song.

Thanks.

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
December 24, 2011

with as3, you can approximate what you want by using the SoundMixer's computeSpectrum() method.  you would enable fftmode and sum the absolute values to get a volume approximation that you would then need to normalize.

with as2, it's not practicable.