3 Replies Latest reply on Apr 20, 2010 7:53 AM by kglad

    How do I make the sound start up depending on when the movie was played?




      I am just a rookie in Flash, and came across a problem. I'm trying to create a flash movie that will display time like a TV ident does. I've successfully set it up to get the correct time and play a "tik-tok" sound as each second passes. However, it is to have some background music, and I can't get it to start when I need it - for instance, if the time is 18:00:00 it should start at 00 seconds, it time is 18:00:21 it should start at 21 seconds etc. This is the script I used for ticking:


      onClipEvent (load) {

           var snd:Sound = new Sound();

      snd.loadSound("tik.mp3", true);

      var tik:Function = function ()


      snd.start(0, 0);


      var inter:Number = setInterval(tik, 1000);


      What should I use for the complex situation as described above? My only guess is that I should sync it to the frames in the background video (behind the clock, running at 24 FPS), but I haven't got a clue how to set that up as well. Can someone please help? If necessary I can upload the .fla file.