4 Replies Latest reply on Sep 3, 2006 2:24 PM by kglad

    sound Loading in IE

    Tal_CS Level 1
      Hi,

      I'm trying to load a sound into various objects created on stage dynamically.
      Within Flash env. and FireFox, all goes right:

      A container MC is created
      A Sound object is created within that MC
      onLoad function is registered for each container['s].sound


      I can't figure out how to bypass the fact that IE wouldn't fully-load the sound into memory. Needless to say this problem stucks my movie from playing properly later on.

      Following is how I create the sound obj.

      Thanks.
        • 1. Re: sound Loading in IE
          kglad Adobe Community Professional & MVP
          you should define your onLoad() handler before you execute your loadSound() method.
          • 2. Re: sound Loading in IE
            Level 7
            Here are some thoughts
            1. Is it possible a corrupted sound is caught in the cache on the testing
            machine?
            2. Substitute other sounds to see if the sound is a problem.
            3. Assign the onLoad BEFORE the loadSound method. It is remotely possible
            that at run time the loadSound gets an undefined reference to onLoad.
            Remember that thisMC_snd.onLoad = function is a runtime assignment versus a
            compile time and so for runtime do things in the order needed for proper
            memory assignment.

            --
            Lon Hosford
            www.lonhosford.com
            Flash, Actionscript and Flash Media Server examples:
            http://flashexamples.hosfordusa.com
            May many happy bits flow your way!
            "Tal_CS" <webforumsuser@macromedia.com> wrote in message
            news:ed4a4k$ba$1@forums.macromedia.com...
            > Hi,
            >
            > I'm trying to load a sound into various objects created on stage
            > dynamically.
            > Within Flash env. and FireFox, all goes right:
            >

            > A container MC is created
            > A Sound object is created within that MC
            > onLoad function is registered for each container['s].sound
            >

            >
            > I can't figure out how to bypass the fact that IE wouldn't fully-load the
            > sound into memory. Needless to say this problem stucks my movie from
            > playing
            > properly later on.
            >
            > Following is how I create the sound obj.
            >
            > Thanks.
            >
            >
            > var thisMC:MovieClip = this.createEmptyMovieClip("object"+i+"_mc", i);
            > thisMC.snd = new Sound(thisMC);
            > thisMC.snd.loadSound(objects_array .src, false);
            > // false = [I want the sound to load into memory as an event sound, for
            > later
            > use. (short sounds)]
            > [...]
            > thisMC.snd.onLoad = function(success:Boolean):Void {
            > if (success) { [...]
            > // to this step IE doesn't reach!!
            >


            • 3. Re: sound Loading in IE
              Tal_CS Level 1
              Thanks Kglad, Lon,
              You were right. I missed the fact that I loaded the sound without adding the onLoad function to the object.
              • 4. Re: sound Loading in IE
                kglad Adobe Community Professional & MVP
                you're welcome.