1 Reply Latest reply on May 10, 2006 12:55 PM by TimSymons

    sound problems with an .avi file?

    eDubs
      Hello all,
      I am working on a presentation where there is a background loop .wav and some .avi files. When the .avi files have audio I am dropping the volume of the loop. I made the loop a new sound with the code below and set up a global so that I could properly target the sound. The code is below.

      // set up the global so that bgMusic can be targeted from other scenes
      _global.musicTimeLine = this;

      // make a new Sound called bgMusic
      // loopwav is the linked name of the .wav file
      bgMusic = new Sound();
      bgMusic.attachSound("loopwav");
      bgMusic.start();
      trace(bgMusic.getVolume());

      I then drop the volume on the frames with .avi movies with audio with:

      // drop the volume of bgMusic
      musicTimeLine.bgMusic.setVolume(20);

      Does anyone know why this is also affecting the audio in the .avi file? Thanks to anyone who can help!

      EW
        • 1. Re: sound problems with an .avi file?
          TimSymons Level 1
          It may be because new Sound() is a global sound controller. Meaning that it will affect any and all sounds within your movie. Try associating the Sound with a movieclip. For example,

          bgMusic = new Sound(this);

          Then changing properties of the bgMusic sound object should only affect the sounds in that movieclip and not globally.

          Also, not sure if this is true for FLV and MP3 files brought in using the FLV component.

          Tim