Dynamic netStreams and naming them

Hi,

I have a video app that uses many cameras. I create netStream objects with a for loop and I put them all into an array - aNS[].


for(var i:int=0; i<4; i++){
    aNS* = new NetStream(aNC*);
    aNS*.addEventListener(NetStatusEvent.NET_STATUS, netStreamHandler);
}

Then I have the netStreamHandler function which is called when the NetStatusEvent.NET_STATUS is envoked - great all of this works perfectly.


function netStreamHandler(event:NetStatusEvent):void {
     trace(event.target.name)
}

except for the trace - How can I add a name to the netStream so when the netStreamHandler is called the trace kicks back the name of the netStream.

I do this all the time with other objects like buttons, videos, comboBoxes etc … but when I try to do the same to the netStream I always get errors.

How is this done?

waffe