2 Replies Latest reply on Jul 19, 2006 8:53 AM by Andrew20

    Song loop from particular time

    Andrew20
      Ok,

      I think this is something easy, but I dont know what to use.

      I got a song that I cut at 54.4 sec and after the first complete play I want this song to loop from 11.95 sec to the end!
      Is there a way using action script or using a movie clip with the song inside(cause I tried to put a gotoandplay to a particular frame at the end, but it begin the song from the beginning)

      thanks a lot in advance
        • 1. Re: Song loop from particular time
          albee Level 1
          Use the Sound class. Let's say your song is named mysong.mp3. Once you import it into your library, select the icon in the library, and choose linkage (right click on the icon) and then click Export for ActionScript and Export in first frame. Name it something (for this example we'll name it mysong). Click OK.

          Then on your main timeline, enter the following code:

          my_sound = new Sound();
          my_sound.attachSound("mysong");
          my_sound.onSoundComplete = function() {
          // first parameter is the number of seconds the sound is offset, the second parameter is the number of loops
          my_sound.start(11.95, 99);
          };

          When you want to start the sound the first time, add this to your frame or button code:
          my_sound.start();

          Study the other methods and properties of the Sound class. This gives you a lot more control of sounds than placing them on the timeline does.

          Good luck,

          Albee
          • 2. Re: Song loop from particular time
            Andrew20 Level 1
            WOW!
            it's really an helpfull complete answer!!

            thanks a lot Albee!
            I owe you a beer