2 Replies Latest reply on Jun 26, 2006 9:59 AM by yduab

    Video sound stops when setVolume on root music background

    yduab
      I made a flash animation with a backgroung music loop and buttons. When a button is clicked, a video file embeded in a swf plays in a movieclip on the stage. Also, I set the background music volume to 0 as to listen to the video sound. The problem is that when the background music volume is changed, the video plays but the audio changes the same. I tried to stop the background music, and then the video sound also stops!
      Can someone help?
      Here is my code:
      _root.my_sound = new Sound();
      _root.my_sound.attachSound("music.mp3");
      _root.my_sound.start(0,1000);
      }
      _root.["bt_mc"].onPress = function(){
      _root.my_sound.setVolume(0); // or _root.my_sound.stop();
      _root.videoDisplay.loadMovie(this.videoclip); //_root.videoDisplay is the target mc
      }
        • 1. Re: Video sound stops when setVolume on root music background
          Level 7

          "yduab" <webforumsuser@macromedia.com> wrote in message news:e7oua3$hsk$1@forums.macromedia.com...
          >I made a flash animation with a backgroung music loop and buttons. When a
          > button is clicked, a video file embeded in a swf plays in a movieclip on the
          > stage. Also, I set the background music volume to 0 as to listen to the video
          > sound. The problem is that when the background music volume is changed, the
          > video plays but the audio changes the same. I tried to stop the background
          > music, and then the video sound also stops!
          > Can someone help?
          > Here is my code:
          > _root.my_sound = new Sound();
          > _root.my_sound.attachSound("music.mp3");
          > _root.my_sound.start(0,1000);
          > }
          > _root.["bt_mc"].onPress = function(){
          > _root.my_sound.setVolume(0); // or _root.my_sound.stop();
          > _root.videoDisplay.loadMovie(this.videoclip); //_root.videoDisplay is the
          > target mc
          > }

          To have separate volume levels you have to attach the sound objects to different movieclips like this..

          _root.my_sound = new Sound(one_mc);

          The movieclip can be just an empty clip that you make with createEmptyMovieClip.
          tralfaz


          • 2. Re: Video sound stops when setVolume on root music background
            yduab Level 1
            Oops!!
            Thx a lot tralfaz.