Groups | Blog | Home
all groups > flash actionscript > june 2004 >

flash actionscript : Synchronizing music beats to Actionscript


CSEd2
6/12/2004 6:15:40 PM
I use the actionscript below to synchronize my timeline with an sound object.

// --- Advance Slides ---
this.onEnterFrame = function() {
if(myAudio.position > 10000) {gotoAndStop("slide2");}
if(myAudio.position > 16500) {gotoAndStop("slide3");}
if(myAudio.position > 42500) {gotoAndStop("slide4");}
}
noSpamPlease
6/12/2004 6:49:38 PM
Hello World

I'm building a Flash web site using MX2004 (PC XP Pro).

I'm controlling my sound (music) loop using Actionscript. I would like to
ask if anyone knows of any techniques that I can use to trigger a function
from the downbeat of the drum (or in effect the rhythm of the music) I am
aware that I can put keyframes by the peaks of the wave if I manually bring
the sound file onto a timeline...however....that is not really a clean way
of doing it as ultimately the keyframes end up out of sync with the music!

Help!

Many thanks in advance

Dave

AddThis Social Bookmark Button