# NetConnection/NetStream Mp3's?

**URL:** <https://forum.kirupa.com/t/netconnection-netstream-mp3s/293452>\
**Category:** Uncategorized\
**Created:** [July 29, 2009, 6:50am UTC](https://forum.kirupa.com/t/netconnection-netstream-mp3s/293452 "2009-07-29T06:50:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![soundman](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@soundman](https://forum.kirupa.com/u/soundman)\
**Post date:** [July 29, 2009, 6:50am UTC](https://forum.kirupa.com/t/netconnection-netstream-mp3s/293452/1 "2009-07-29T06:50:48Z")

</div>

Hey,

Im having problems with playing a mp3 from a streaming url, this is my first time using the NetConnection class and my actionscript knowledge is pretty basic. I’ve found alot of online reference to using this for .flv but theres nothing out there really for mp3’s. So, my NetConnection.onStatus is returning “connected” but i can’t figure out how to actually access and be able to hear the mp3. Is there somthing blatantly obvious that im missing??? If anyone is able to help, that’d be great!

```auto

stop();

nc = new NetConnection();
nc.connect("RTMP:// *****.fcod.llnwd.net/a2934/");
nc.onStatus = function(info){
    if (info.code == "NetConnection.Connect.Success") {
        trace("connected");
        playIt();
    }    
    else {
        if (! nc.isConnected){
            trace("not connected");
        }
    }
};
function playIt(){
var ns:NetStream = new NetStream(nc);
ns.setBufferTime(0);
ns.play("o28/Tracks/7780/ ****** 440240c179b847c18d33cb57e717ded9.mp3"); 
test_mc.attachAudio(ns);
testSound = new Sound(test_mc); 
testSound.setVolume(100);

}

getTotalTime = function () {
    ns.onMetaData = function(obj) {
        _global.videoDuration = obj.duration;
        trace(obj.duration);
    };
}
onEnterFrame = function () {
    getTotalTime();
    totalPlayingTime = Math.round(_global.videoDuration);
    currentPlayingTime = Math.round(ns.time);
    if (currentPlayingTime>.01) {
        test_mc._x = 0;
        test_mc._y = 0;
    }
    if (totalPlayingTime == currentPlayingTime) {
        ns.seek(0);
        ns.pause();
        //ns.close();
        trace("song end");
    }
};

```
