12 Replies Latest reply on Oct 5, 2012 7:45 AM by kglad

    Sound playing issue

    LanBanan88

      Hi there! Im new to this, so please excuse me if I have done something incorrect. I am having troubles with sound on my flash game. The weird thing is, the sound plays perfectly fine when I test the scene but not when I test the movie. The previous scenes work fine and I have used the same coding and actions, but for some reason its just this scene.I am willing to send my file to anyone willing to help if it would help them understand what i mean. Please help!

        • 1. Re: Sound playing issue
          kglad Adobe Community Professional & MVP

          what code do you use to play your sound or, is your sound attached to a timeline?

          • 2. Re: Sound playing issue
            LanBanan88 Level 1

            Hi Kglad.

             

            Thank you so very much for responding. I hope you can help! I have the sound attached on the timeline, I think. I just created a new layer then dragged the sound file from the library to the stage. On previous scenes the sound plays automatically, but for some reason from this scene onwards it does not. On the previous scene of this one, I have used the code for the "next" button:

             

            on (press) {stopAllSounds();

             

             

            }

             

            I originally thought this was the problem because I am stopping all sounds, but it just doesnt make sense to me because I have the exact code on other scenes and the following scene plays sound automatically with no problem.

             

            Would it be easier if I sent you the file?

            • 3. Re: Sound playing issue
              kglad Adobe Community Professional & MVP

              attached to frame 1 in the scene where you have your sound, add:

               

              trace(this+" "+this._currentframe);

               

              and test your swf.

               

              do you see trace output AND fail to hear your sound? 

               

              if yes, copy and paste the trace output and click the frame where your sound is attached and take a screenshot that shows that frame along with the properties panel.  attach that screenshot here, too.

              1 person found this helpful
              • 4. Re: Sound playing issue
                LanBanan88 Level 1

                Thank you Kglad. I am very new to Flash and I have no idea what you mean by trace output. However, I did copy and paste the code that you gave me, and it still did not produce any sound. I did notice that in "output" which is next to timeline, this was shown _level0 184. I have no clue what this means, but I have added 2 screenshots that I hope can help you:

                 

                Screen Shot 2012-10-03 at 1.28.22 PM.pngScreen Shot 2012-10-03 at 1.28.14 PM.png

                 

                Please let me know if you need any more information.

                 

                Thanks once again.

                 

                Lana

                • 5. Re: Sound playing issue
                  kglad Adobe Community Professional & MVP

                  you can removed that code.  it just confirms that the frame that contains that code (which should be the same as the one that contains your sound), plays.

                   

                  now, in the properties panel you showed, change sync from event to stream and retest.

                  1 person found this helpful
                  • 6. Re: Sound playing issue
                    LanBanan88 Level 1

                    Nope. Still does not work. Would it being too long have anything to do with it? For the scene before, and others, sound goes on till like the 100th frame or around then....this is goes to the 500th scene. When I checked it, for some weird reason, just the sound layer was up to a number very close to 5000! and the rest of the layers were at 500. So i shortened the sound layer to make it the same length of frames as the others, and it still does not work....

                    • 7. Re: Sound playing issue
                      kglad Adobe Community Professional & MVP

                      there's a limit of 16000 frames total for any timeline.  but you have not reached that or you would not have seen that trace (assuming you tested your movie and not tested the scene).

                       

                      remove that sound and replace it with another sound that plays correctly in a previous scene.  does that work in your tiger scene?

                      1 person found this helpful
                      • 8. Re: Sound playing issue
                        LanBanan88 Level 1

                        Hi Kglad

                         

                        I removed and replaced with another sound that has worked previously....still does not work! This is really strange!

                        • 9. Re: Sound playing issue
                          kglad Adobe Community Professional & MVP

                          are you executing stopAllSounds() in the frame that contains your tiger sound?

                          • 10. Re: Sound playing issue
                            LanBanan88 Level 1

                            Yes, but it is linked to the "Next Button"

                            • 11. Re: Sound playing issue
                              LanBanan88 Level 1

                              Sorry, what I meant was that stop all sounds is not on the frame that contains the tiger sound, but it is on the next button.

                              • 12. Re: Sound playing issue
                                kglad Adobe Community Professional & MVP

                                check your private messages.