How do automatically close the netStream?

I have a bunch of buttons, that when pressed, play an external FLV video. I’m using a NetStream connection to play the video, but I want the NetStream to automatically close when the video is done playing. How do I do this??

Any help is much appreciated!