3 Replies Latest reply on Sep 12, 2011 1:51 PM by kglad

    AS2 (Flash CS5) - What am I doing wrong?

    SoloXX007

      I am loading mp3's externally as to not bloat the swf. However, only 1 out of 3 songs play (2nd song plays) for this jukebox I'm having to create for an assignment. I would think if one song played, they all would.  I've checked the AS2 code and it all seems right to me; the song names  and button instance names.

      I sure could use some insight as to why the 1st and 3rd song doesn't play. My jukebox is at:
      http://webspace.westwood.edu/student...BKjukebox.html

      ....and here is my simple code in the first Actions frame. This is the only code I used for the jukebox.

       

       

      stop();

      var my_sound1:Sound = new Sound ();
      my_sound1.loadSound ("Desperado.mp3");

      var my_sound2:Sound = new Sound ();
      my_sound2.loadSound ("RocketMan.mp3");

      var my_sound3:Sound = new Sound ();
      my_sound3.loadSound ("SouthernCross.mp3");

      play_btn1.onRelease = function ()
      {
           stopAllSounds ();
           my_sound1.start ();
           gotoAndStop ("Eagles");
           play_btn1._visible = false;
           play_btn2._visible = true;
           play_btn3._visible = true;
      };

      stop_btn1.onRelease = function ()
      {
           stopAllSounds ();
      };

      play_btn2.onRelease = function ()
      {
           stopAllSounds ();
           my_sound2.start ();
           gotoAndStop ("Elton");
           play_btn1._visible = true;
           play_btn2._visible = false;
           play_btn3._visible = true;
      };

      stop_btn2.onRelease = function ()
      {
           stopAllSounds ();
      };

      play_btn3.onRelease = function ()
      {
           stopAllSounds ();
           my_sound3.start ();
           gotoAndStop ("CSN");
           play_btn1._visible = true;
           play_btn2._visible = true;
           play_btn3._visible = false;
      };

      stop_btn3.onRelease = function ()
      {
           stopAllSounds ();
      };