Make an object react to a sound in Flash
I have a speaker and I need this speaker moves with a sound. I need to simulate the real world speaker vibration generated by the low and mid frequencies.
Does not have to be 开发者_高级运维soo realistic what I whant to know is how I can play a sound and get son mumerical value usefull for apply numerical size transformation to the speaker.
Cheers!
You can detect the amplitude of a sound in AS3 using the SoundMixer.leftPeak
and SoundMixer.rightPeak
methods: there's a nice example here...
精彩评论