2 Replies Latest reply: Oct 17, 2011 8:54 PM by WebGuyDesign RSS

    Flash mp3 player (pause player while the mp3 loads)

    WebGuyDesign Community Member

      The following text below is apart of the mp3 player that I have that plays a song, but when the website is launched the song playes right away, which I DO NOT WANT.   how do i add a mute to this so that it does not affect the loading process.

       

      fscommand("allowscale", "false");
      dd = new Sound();
      dd.loadSound(http://www.mywebsite/song/example/link, true);
      xx = bar._width;
      orginal_width = bar._width;
      _root.soundbtndis._visible = false;
      _root.soundbtndis.disabled = true;
      this.onEnterFrame = function() {
      t1 = int(dd.duration/1000/60);
      t1 = t1+" : "+int((dd.duration/1000-(t1*60)));
      ddf = int((dd.duration-dd.position)/1000/60);
      elapsed_sec = int((((dd.duration-dd.position)/1000/60)-ddf)*60);
      if (elapsed_sec<10) {
        elapsed_sec = "0"+elapsed_sec;
      }
      if (ddf<10) {
        ddf = "0"+ddf;
      }
      if (_root.stpd) {
        elapsed = _root.t1;
      } else {
        elapsed = ddf+" : "+elapsed_sec;
      }
      //mo=dd.position/1000
      //elapsed = 
      vol = dd.getVolume()+" %";
      dur = dd.duration;
      pos = dd.position;
      per = (pos/dur)*100;
      m = (pos/dur)*100;
      bar._width = (m*xx)/100;
      drag._x = _root.bar._width+_root.bar._x;
      //drag._y = 136;
      if (stpd) {
        xx = 0;
      } else {
        xx = orginal_width;
      }
      // function keys
      if (Key.isDown(67)) {
        pauseit();
      }
      if (Key.isDown(88)) {
        playit();
      }
      if (Key.isDown(86)) {
        stopit();
      }
      //**************************************