11 Replies Latest reply on Sep 21, 2009 11:21 PM by kglad

    Controlling only a single sound

    JAM0367

      Hello all, i am stuck on the final part of my flash website and I figured out one problem. I used a template from a flash template website but I just realized that the background control was written to control all sounds, now all the video sound and seperate sounds objects stop when I click on this one button. If someone would please help me re-write this or give me a tutorial, it would be much appreciated. This is the code below that I found on the button. There are others also.

       

       

      onClipEvent (load) {
          step = 5;
          _root.snd=100;
          cur = _root.snd;
      }

       

      onClipEvent (enterFrame) {
          //trace (_root.snd);
          //trace(cur);
          if (cur > _root.snd) {
              cur -= step;
          } else if (cur < _root.snd) {
              cur += step;
          }
         
          _root.globalsound.setVolume(cur);   
      }

       

      __________________________________________________________________________________________ ___________________________________

       

       

      on(press){
          _root.snd = 0;   
          gotoAndStop(5)
          }

       

      __________________________________________________________________________________________ ___________________________________

       

       

      on(press){
          _root.snd = 100;
          gotoAndStop(1)
          }

       

      __________________________________________________________________________________________ ___________________________________

       

       

      I believe this is it, thank you in advance.