Hosting Solutions
mobile_logo Table of Contents
seal_frontseal_back

Sound Amplitude Visualization Programming

This video shows how to create sound visuals that animate to the beat by creating a channel for the sound object. That way we can access the left and right peaks. // Define the sound object and the sound channel var snd:Sound = new Sound(); var req:URLRequest = new URLRequest("mp3_files/raquel my body.mp3"); snd.load(req); var channel:SoundChannel; channel = snd.play(); status_txt.text = "The song is now playing"; // Enter Frame Event // We are going to use this for more sound control addEventListener(Event.ENTER_FRAME, onEnterFrame); function onEnterFrame(event:Event):void { leftpeak_txt.text = ""+(Math.round(channel.leftPeak * 100)); rightpeak_txt.text = ""+(Math.round(channel.rightPeak * 100)); leftBar.height = (Math.round(channel.leftPeak * 100)); rightBar.height = (Math.round(channel.rightPeak * 100)); } // Sound completion event function and its listener channel.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete); function onPlaybackComplete(event:Event){ removeEventListener(Event.ENTER_FRAME, onEnterFrame); status_txt.text = "The song is over"; }
thumb

Flash Videos

Sound Programming

Adding Sounds to Flash Buttons and Flash TimelineScroll and Click MP3 Playlist Player Tutorial Part 6Scroll and Click MP3 Playlist Player Tutorial Part 5Scroll and Click MP3 Playlist Player Tutorial Part 1Scroll and Click MP3 Playlist Player Tutorial Part 3Scroll and Click MP3 Playlist Player Tutorial Part 2Scroll and Click MP3 Playlist Player Tutorial Part 4MP3 Playlist BoomBox Source FileMP3 Simple Playlist Player TutorialUse Sound Anywhere in Your ProjectMP3 Amplitude PlayerVolume Control Using Custom SlidersCreating Toggle Style Media Play ButtonSound Autoplay LogicSound Amplitude Visualization ProgrammingLoading Sounds Using the Sound Object or Library FilesScroll and Click MP3 Playlist Player Tutorial Part 7