5 Replies Latest reply on Jul 19, 2006 8:31 PM by Newsgroup_User

    Preloader breaks all sound

    Rarrum
      I'm working on a game (completely in actionscript, not using the ui stuff for more than the minimum neccesary) in flash, and the preloader for it seems to completely break sound for some reason.

      The preloader is a seperate swf, which shows a simple image and loading bar.

      The main game starts on frame 5, and similarly just consists of a single call to "start" it all (via SetInterval).

      If I open the game's swf by itself all the sound works fine. But if the preloader below is used, no sound plays. Any ideas what might cause this...?

        • 1. Re: Preloader breaks all sound
          webby_mn
          It might be because of the Sound linkage properties. When you select the Export for Action Script option and specify the linkage ID the option Export in First Frame gets selected. This causes the datasize in the first frame to go up delaying the Preloader display. If you disable the Export in First frame option, the preloader loads normally and then the sound will not play along wiht the movie.

          I am having similar problems. Trying to find a solution for this though.
          • 2. Re: Preloader breaks all sound
            Rarrum Level 1
            Tried that... unchecked export on first frame for all the sound files. It still didn't work when the preloader loads it, but then also didn't even work without the preloader.
            • 3. Re: Preloader breaks all sound
              Level 7
              Rarrum wrote:

              > var voicesnd:Sound=new Sound();

              Always speciy explicitely the target timeline for your sound.
              var voicesnd:Sound=new Sound(this); // <- or whatever mc timeline you wish

              Tim
              • 4. Re: Preloader breaks all sound
                webby_mn Level 1
                quote:

                Originally posted by: Newsgroup User
                Rarrum wrote:

                > var voicesnd:Sound=new Sound();

                Always speciy explicitely the target timeline for your sound.
                var voicesnd:Sound=new Sound(this); // <- or whatever mc timeline you wish

                Tim



                Tim sorry i didnt get you. I have a preloader that runs on the root timeline and the main movie runs in the "_root.mainmc" timeline. So how do i do that. I didnt have any ption but to select the export in first frame for my sound. My preoloader is getting delayed and displays after 42%. Thanks in advance.
                • 5. Re: Preloader breaks all sound
                  Level 7
                  Hi Webby_mn,

                  webby_mn wrote:
                  > �Tim sorry i didnt get you. I have a preloader that runs on the root
                  > �timeline
                  > and the main movie runs in the "_root.mainmc" timeline. So how do i do
                  > that. I didnt have any ption but to select the export in first frame for
                  > my sound. My preoloader is getting delayed and displays after 42%. Thanks
                  > in advance.

                  You problem is different from Rarrum's In your case, to make sure linked
                  symbols are exported after the preloader, do the following:
                  1) in the linkage settings for your sound, keep the "export for
                  actionscript" but uncheck the "export in first frame"
                  2) create a movieclip in your library called "exported_symbols"
                  3) leave the first of that mc empty, except for a stop action.
                  4) in the second frame of the mc, import your sound as event sound (you can
                  import several sounds or any linked symbols actually (create several
                  layers)
                  5) place an instance of your "exported_symbols" mc in your main timeline,
                  right after the preloader and before the content.

                  I recall some people have created jsfl scripts to do that automatically
                  (place all exported symbols in a dummy movieclip), but I can't remember any
                  url for that unfortunately.

                  hope that helps,
                  Tim.