5 Replies Latest reply on May 18, 2006 6:13 PM by MorningLight

    Music Player

    MorningLight
      I have this script:

      function playMusak(){
      delete bgMusak;
      bgMusak = new Sound();
      bgMusak.onLoad = function(success) {
      if (!success) {
      trackInfo.text = "Failed to load track.";
      }
      };
      bgMusak.loadSound("mp3s/mp3-" + curTrackNum + ".wma", true);
      };

      and although I don't get an error for it, I also don't get any sound.... any ideas? (yes, I do have my files in a file called mp3, and the wma's are named mp3 because I'm still trying to get this to work at all)
        • 1. Re: Music Player
          Level 7
          > wma's are named
          > mp3 because I'm still trying to get this to work at all)

          And there's your problem. It's no good *naming* your mwas .mp3, they have to
          *be* MP3s.

          --
          -------------------------------
          Remove '_spamkiller_' to mail
          -------------------------------

          my files in a file called mp3, and the>


          • 2. Re: Music Player
            MorningLight Level 1
            sorry, I think that I made that confusing. The files have the extention of .wma. The part of calling them mp3 is the first part of the name, which shouldn't matter, but I figured if I can get it to work, that I can change the part where it is referencing them as mp3- to something that makes more sense within the folder.

            So, it should work correctly, shouldn't it? It is possible to make the player play a .wma instead of a .mp3 in a player atmosphere, right?
            • 3. Re: Music Player
              Rothrock Level 5
              Have you read the help file for loadSound? It says it loads mp3 files and that is it. It doesn't load wma files. There is no way to play wma through Flash. (Well maybe with some crazy third party tools, but even then I'm dubious.)

              A rose by any other name would smell as sweet. But calling a pile of crap a rose won't make it smell as sweet.

              I would call the folder Audio or Sounds instead of mp3s, since the stuff in the folder isn't mp3s.
              • 4. Re: Music Player
                Level 7
                Oh right. No, naming the folder MP3 will not present a problem. Trying to
                dynamically load WMA files will.

                --
                -------------------------------
                Remove '_spamkiller_' to mail
                -------------------------------


                • 5. Re: Music Player
                  MorningLight Level 1
                  Thanks guys. I'm bummed that I have to change the file to an mp3, but I guess a girl's gotta do what a girl's gotta do.