5 Replies Latest reply on May 3, 2008 10:06 AM by clbeech

    Audio problem- Multiple songs playing at once

    bernielove1 Level 1
      Hello,

      I have a problem with playing a song. Everything seems fine until the song reaches about half way and then the same song starts playing ontop of the same song. First you hear the song, then you hear two songs, then three, and so on.

      What am I doing wrong? I can't figure it out. Any help would be great.

      Thanks

      Bernie
        • 1. Re: Audio problem- Multiple songs playing at once
          Level 7
          Bernie,

          > First you hear the song, then you hear two songs, then three,
          > and so on.
          >
          > What am I doing wrong? I can't figure it out. Any help would
          > be great.

          There are a number of ways to get audio to play in Flash. Can you
          describe the steps you're taking? (e.g., you're adding audio to a keyframe,
          or maybe you're using ActionScript -- if so, which version of ActionScript?)
          If you can spell out what you've done so far, it's likely someone can help
          you find a solution. :)


          David Stiller
          Co-author, Foundation Flash CS3 for Designers
          http://tinyurl.com/2k29mj
          "Luck is the residue of good design."


          • 2. Re: Audio problem- Multiple songs playing at once
            bernielove1 Level 1
            I added the audio to keyframes and I am using AS 2.0. I want the audio to loop, just once it reaches the end of the song. Does the final keyframe need to be a blank keyframe?
            • 3. Re: Audio problem- Multiple songs playing at once
              clbeech Level 3
              I would say that if you want the song to loop that it may be better to use a Sound Object and a little code. so if you would be interested in this route - remove the sound from the timeline.

              first - set up the sound by selecting it in the library and right-click select 'properties...' - then in the properties panel check the 'export for ActionScript' box and give the sound an 'Indentifier' name - this will allow you to use the sound file within the document and point to it in code by using the ID name.

              next - make a new layer called 'actions' on the main timeline if you don't have one already - select the first frame and enter the code below - replace the 'IDname.mp3' with the ID name of your sound file you've assigned.

              see the 'sound.start()' method below - the second parameter in it refers to the amount of 'loops' that it will run before stopping - you can set this any way you would like.

              more information on the Sound Object class is available HERE
              • 4. Re: Audio problem- Multiple songs playing at once
                bernielove1 Level 1
                Ah yes,

                This sounds like a much better way for me to go. Thank you very much for the very clear instructions.

                and thank you for your time,

                Bernie