0 Replies Latest reply on May 17, 2006 4:13 PM by DumbFudge

    Help Quick!  Action Script Question

    DumbFudge
      The following code lets me use buttons to switch music. The music loops until I switch it.

      How do I make it so that the previous music doesn't stop looping. So you can have more then one music going at once.

      That is all...

      // initialize starting track

      var soundNext:String = "beats01";
      // set up dynamic sound object
      var dynamicSound:Sound = new Sound(this);
      dynamicSound.attachSound(soundNext);
      dynamicSound.start(0, 1);
      nowPlaying.text = soundNext;
      beats01.onRelease = beats02.onRelease=beats03.onRelease=beats04.onRelease=beats05.onRelease=beats06.onRelease =beats07.onRelease=beats08.onRelease=function () {
      soundNext = this._name;
      nextTrack.text = soundNext;
      };

      // NEXT SOUND
      dynamicSound.onSoundComplete = function() {
      dynamicSound.attachSound(soundNext);
      dynamicSound.start(0, 1);
      nowPlaying.text = soundNext;
      };



      stop();