3 Replies Latest reply on Jul 24, 2008 8:05 AM by kglad

    Help with loading SWFs and sounds

    german01
      I'm creating a flash projector.exe
      The folder where I have subfolders is named "Hisp_Lat_2008",
      I have a subfolder Movies from which my main movie Master_Template loads SWFs.

      I used the following script to load SWFs

      on (release) {
      _root.createEmptyMovieClip("master_1", 0);
      loadMovie("Movies/History _Spanish_Language_2008.swf", "master_1");
      master_1._x =0;
      master_1._y =81;
      }

      PROBLEM:
      The original SWFs come with audio. Although they load into Master_Template, the SWFs don't have any audio.

      What should I do?

      Thanks for your assistance.



        • 1. Re: Help with loading SWFs and sounds
          kglad Adobe Community Professional & MVP
          find where the sound is instantiated

          something = new Sound()

          and change it to

          something = new Sound(this);
          • 2. Re: Help with loading SWFs and sounds
            german01 Level 1
            Thanks Kglad:

            It did work just adding (this) to sounds.

            Here is how the program works now.


            Master_Template (first frame) Creates an empty movie clip, which will help load other movies.

            stop();

            var mc = this.createEmptyMovieClip("master_1", this.getNextHighestDepth());


            Master_Template (buttons on navigation bar) I positioned each movie right below the navigation bar, which is 80 pixels height. I use the empty movie clip created on frame one. Movies is the subfolder containing all my SFWs.

            on (release) {

            mc.loadMovie("Movies/History _Spanish_Language_2008.swf");
            master_1._x =0;
            master_1._y =81;
            }


            SubFolder Movies

            every sound has the following structure:

            stop();
            my_Sound = new Sound(this);
            my_Sound.attachSound("p2.mp3");
            my_Sound.start();

            Without (this) the file would load to Master_Template, but without sounds.

            Hope this may help somebody else.

            Thanks for your help Kglad.

            German
            • 3. Re: Help with loading SWFs and sounds
              kglad Adobe Community Professional & MVP
              you're welcome.