playing mp3s with netStream

  • johnnygod
  • Novice
  • Novice
  • No Avatar
  • Joined: Feb 22, 2007
  • Posts: 25
  • Status: Offline

Post March 17th, 2007, 11:20 am

Does any know if I can play mp3 s through my progressive download video set up?

Live docs indicate that this can be done with the netStream class when streaming with Flash Comm Server, but can we use the netStream class to play an mp3 with a simple progressive download set up?

Code: [ Select ]

    var netConnection_nc:NetConnection=new NetConnection;
netConnection_nc.connect(null);

var netStream_ns:NetStream=new NetStream(netConnection_nc);

_root.play_mc.onPress=function(){
    netStream_ns.play(currentSong);
}
  1.     var netConnection_nc:NetConnection=new NetConnection;
  2. netConnection_nc.connect(null);
  3. var netStream_ns:NetStream=new NetStream(netConnection_nc);
  4. _root.play_mc.onPress=function(){
  5.     netStream_ns.play(currentSong);
  6. }
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post March 17th, 2007, 11:20 am

  • johnnygod
  • Novice
  • Novice
  • No Avatar
  • Joined: Feb 22, 2007
  • Posts: 25
  • Status: Offline

Post March 17th, 2007, 11:51 am

or this

Code: [ Select ]
var myNetConnection:NetConnection=new NetConnection();

myNetConnection.connect(null);

var netStream_ns:NetStream=new NetStream(myNetConnection);

_root.myVideo.attachVideo(netStream_ns);

netStream_ns.play("mp3:audio/beatles")
  1. var myNetConnection:NetConnection=new NetConnection();
  2. myNetConnection.connect(null);
  3. var netStream_ns:NetStream=new NetStream(myNetConnection);
  4. _root.myVideo.attachVideo(netStream_ns);
  5. netStream_ns.play("mp3:audio/beatles")
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 05, 2004
  • Posts: 1254
  • Loc: Ro
  • Status: Offline

Post March 18th, 2007, 10:44 pm

i thought that Sound class was specially designed for loading external mp3, don't know why you beat your head against the wall trying to do this with NetStream.
Code: [ Select ]
var sSound:Sound = new Sound(this);
sSound.loadSound("mysound.mp3", true);
  1. var sSound:Sound = new Sound(this);
  2. sSound.loadSound("mysound.mp3", true);
“True mastery transcede any particular art. It stems from mastery of oneself - the ability, developed throgh self-discipline, to be calm, fully aware, and complety in tune with oneself and the surroundings. Then, and only then, can a person know himself. ”
  • johnnygod
  • Novice
  • Novice
  • No Avatar
  • Joined: Feb 22, 2007
  • Posts: 25
  • Status: Offline

Post March 18th, 2007, 11:49 pm

The NetStream play pause clear methods along with flash comm server seems to give more options for design and development - also the sound associated with the video and netSream seem to have less latency issues

http://cluttered.flvservers.com/audioPlayer02.html

with Song.loadSound

http://cluttered.flvservers.com/movieAudioPlayer.html

netStream

have you ever seen this done? netStream.play(Mp3:mySong)
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 05, 2004
  • Posts: 1254
  • Loc: Ro
  • Status: Offline

Post March 19th, 2007, 4:15 am

nope, never seen netStream to play a mp3.
Only flv. If you find a software to convert from mp3 to flv and instead of image a blank image, then you can play it with the netStream.
“True mastery transcede any particular art. It stems from mastery of oneself - the ability, developed throgh self-discipline, to be calm, fully aware, and complety in tune with oneself and the surroundings. Then, and only then, can a person know himself. ”
  • bozboz
  • Novice
  • Novice
  • No Avatar
  • Joined: Mar 13, 2007
  • Posts: 31
  • Loc: Brighton
  • Status: Offline

Post June 7th, 2008, 11:52 am

Yeah i was trying to do this as well but not having any joy. I wanted one component that could handle video and mp3 that would be quite versatile. Anyone ever worked a way to do this?

Post Information

  • Total Posts in this topic: 6 posts
  • Users browsing this forum: No registered users and 32 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.