3 Replies Latest reply on Apr 28, 2007 5:00 AM by Newsgroup_User

    NetStream MP3 Player

    Shloz
      I'm trying to build an MP3 player in Flash. everything will be local - the SWF and the MP3 files - but i don't want to use Flash Media Server or Flash Communication server.

      So my question is this:
      Is it possible to build an offline MP3 Player without using either Media Server or Communication Server, & if so, how?

      Here's what I've got so far, & I'm getting nothing:

        • 1. Re: NetStream MP3 Player
          Level 7

          Hi,

          I'm not sure but I think the NetStream class does not play mp3 (never
          tried it). It should be done with the Sound class. The helpfiles and a
          quick google would get you there.

          Manno


          Shloz wrote:
          > I'm trying to build an MP3 player in Flash. everything will be local - the SWF
          > and the MP3 files - but i don't want to use Flash Media Server or Flash
          > Communication server.
          >
          > So my question is this:
          > Is it possible to build an offline MP3 Player without using either Media
          > Server or Communication Server, & if so, how?
          >
          > Here's what I've got so far, & I'm getting nothing:
          >
          >
          >
          > var netConnection:NetConnection = new NetConnection();
          > netConnection.connect(null);
          > var netStream:NetStream = new NetStream(netConnection);
          >
          > video.attachVideo(netStream);
          >
          > var audio:MovieClip = this.createEmptyMovieClip('audio',
          > this.getNextHighestDepth());
          > audio.attachAudio(netStream);
          >
          > netStream.play("mp3:media/example.mp3");
          >

          --
          ----------
          Manno Bult
          http://www.aloft.nl
          manno@xs4all.nl
          • 2. NetStream MP3 Player
            Shloz Level 1
            Hi,

            Thanks for the reply. I've spent many hours of Google searching for the answer. The Sound class can indeed be used, but it doesn't give you the same level of control over the playback as the NetStream class does.

            I know it's possible to stream MP3's using NetStream, using the syntax:

            NetStream.play("mp3:example.mp3");

            But everything I've read suggest that this is only possible through the use of the Flash Communication Server or the Flash Media Server. But all of the examples I've found are about making an online player accessing the MP3 files remotely, whereas I'm trying to make a player that will run entirely locally. I guess I was just hoping that, considering everything is executing locally from the machine's hard drive, I wouldn't have to use the FCS or FMS.
            • 3. Re: NetStream MP3 Player
              Level 7
              Hi Shloz,

              what control would you want? The Sound class has everything for
              loaderbars, duration/position indication and seeking.

              Manno

              Shloz wrote:
              > Hi,
              >
              > Thanks for the reply. I've spent many hours of Google searching for the
              > answer. The Sound class can indeed be used, but it doesn't give you the same
              > level of control over the playback as the NetStream class does.
              >
              > I know it's possible to stream MP3's using NetStream, using the syntax:
              >
              > NetStream.play(mp3:example.mp3);
              >
              > But everything I've read suggest that this is only possible through the use of
              > the Flash Communication Server or the Flash Media Server. But all of the
              > examples I've found are about making an online player accessing the MP3 files
              > remotely, whereas I'm trying to make a player that will run entirely locally. I
              > guess I was just hoping that, considering everything is executing locally from
              > the machine's hard drive, I wouldn't have to use the FCS or FMS.
              >

              --
              ----------
              Manno Bult
              http://www.aloft.nl
              manno@xs4all.nl