5 Replies Latest reply on Sep 12, 2011 5:47 PM by Jay_Armstrong

    Favor needed - real quick!

    SoloXX007

      I created a jukebox for an assignment but I need some input to see if the 3 songs play when you press Play....specifically the last song. I can't get that one to play. Please let me know how it goes and thanks!!

       

      http://webspace.westwood.edu/student/briankelsey/week6/Bkjukebox.html

        • 1. Re: Favor needed - real quick!
          Ned Murphy Adobe Community Professional & MVP

          Only the second played for me.

          1 person found this helpful
          • 2. Re: Favor needed - real quick!
            SoloXX007 Level 1

            Dang, it's worse than I thougatht....anyway, I appreciate your feedback on that. Even so, I can't figure out what I'm doing wrong. Perhaps if I paste my simple AS2 code below for insight into whatever I'm doing wrong? By the way, I DO have teh 3 mp3's uploaded to the server as well. I surely will appreciate any guidance given as this assignment is due tonight by midnight.

             

            [CODE]

            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 ();
            };

            [/CODE]

            • 3. Re: Favor needed - real quick!
              leoinplano2011 Level 1

              when i looked at your site, it sounded like when the site loaded, all 3 tracks were playing simultaneously (or at least the Elton John song and the CSN song)..

               

              is there any other actionscript in your fla file that you might have forgotten about? Something is causing the sounds to start() somewhere..

               

              try renaming the Sound variable instances - if there was mystery code starting them, it would have the wrong variable name.

              try using MovieExplorer and search for the sound variables?

               

              A polish note:

              you might consider toggling the visibility of the respective play buttons in the approriate stopBtn handlers.

              • 4. Re: Favor needed - real quick!
                SoloXX007 Level 1

                Oh yeah, I've been fiddling with the code since I first posted my response for feedback. When you tried it, I probably set it to streaming without an initital stop action at the top. I was experimenting. Since then, I've got two songs playing (2nd and 3rd song) but am mystified why the 1st song won't play. The name of the song is desperado.mp3 and the reference ID is the same. I know the code above has the first letter capitalized, but I've made them all lowercase. Flash sometimes seem qwerky about that sometimes.

                 

                Eeeek!  I've got 1 hour to submit this!!

                 

                Edit: They all seem to be working now. I think the problem was I was publishing without saving first. After I saved, then published, they all work. Confirm anybody?

                • 5. Re: Favor needed - real quick!
                  Jay_Armstrong Level 1

                  That saving issue could happen if you are working in an external AS file and only saving the FLA and not the AS file. File > Save All is a nice shortcut for that.