4 Replies Latest reply on Jul 1, 2013 10:11 PM by kglad

    how to loop the music?

    Hand-5

      Hi! I'm using this script for my actionscript layer linked to my music button,

       

      var mysound:Sound = new Sound();

      var pause_spot:Number = new Number();

       

       

      pause_spot = 0

      mysound.attachSound("discomusic");

       

       

      mysound.start(pause_spot,99);

      pause_btn._visible = true;

      play_btn._visible = false;

       

       

      pause_btn.onRelease = function() {

                pause_spot = (mysound.position/1000);

                mysound.stop();

                pause_btn._visible = false;

          play_btn._visible = true;

      }

      play_btn.onRelease = function() {

                mysound.start(pause_spot,99);

                pause_btn._visible = true;

          play_btn._visible = false;

      }

       

      I'm using actionscript 2 by the way...

       

      but when the music is stop, it takes to the middle until the end of song over and over again, how can I loop it back?

       

      thanks in advance.