6 Replies Latest reply on May 18, 2008 9:48 AM by kglad

    Preloading a swf with event sounds.

    mrBeardyhead Level 1
      I have a swf that uses event sounds for speech in it's assets with Export for ActionScript lnkage on. My movie preloads but the preloader movie doesn't appear until the sounds load. Upon loading the swf, I get a background color for about 10 seconds, then my preloader movie appears and plays for what's left and finishes up fine. I know it's the sound cause when I remove the sound, it plays nicely. I need the event sounds cause I must try to synch with a demo on a timeline. It also works like a charm if I put the sound on a keyframe in the movie timeline and don't use Export for ActionScript linkage. How can I get my preloader movieclip to start playing right away and account for all the assets loading? Anyone heard of this happening? I'll attach the preloader code.
        • 1. Re: Preloading a swf with event sounds.
          kglad Adobe Community Professional & MVP
          1. create an external (stand-alone) preloader

          2. don't use your sounds in the frames that contain the preloader, don't export in the first frame and, in the publish settings, assign a frame beyond the frames used by your preloader to load classes.
          • 2. Re: Preloading a swf with event sounds.
            kglad Adobe Community Professional & MVP
            (that's 1. or 2.)
            • 3. Preloading a swf with event sounds.
              mrBeardyhead Level 1
              Thanks for the help. I tried both ideas without success.

              I tried a standalone preloader and the whole movie loads but the sound won't play.
              I tried unchecking first frame and published with a different frame for classes. But no sound plays.

              My actionscript calls for a new Sound in a movie clip within another. The call is not on the main timeline.
              Do you know of any example fla that uses a preloader with classes loading in frames other than the first? I read the preloading class files in the help file. I'm not sure I'm grasping the concept correctly.

              I can't get any sound to play when I switch off the Export in first frame, but it always works when it's on.
              • 4. Re: Preloading a swf with event sounds.
                kglad Adobe Community Professional & MVP
                is your sound created when the main timeline's first frame plays? if so, then you must export in the first frame and your only option is to use a stand-alone preloader. just load your main swf into a _level other than zero.
                • 5. Re: Preloading a swf with event sounds.
                  mrBeardyhead Level 1
                  The sound event isn't called until an embedded movie clip runs. This clip way is past the first frame. And the preloader calls for a movie at the depth of 100.
                  I'm experiencing this lag whenever I have a sound in the library that has the "export for actionscript" call. Even when I don't use the sound at all. This doesn't happen when I have the export call on images or other movie clips in the library.
                  I'm sure I need more training. I have a complicated movie and I've never had to run a preloader for sound or components. I thank you for your efforts, but this is not going to work without more training, I can tell. I better get someone in town to look at this. We'll consider this closed. I appreciate your help. :)
                  • 6. Re: Preloading a swf with event sounds.
                    kglad Adobe Community Professional & MVP
                    you're welcome and if you're want to hire me to fix that for you, send me an email via my website. otherwise, good luck and don't give up. your problem is solvable.