Closeing a net connection and stream

var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
trailer.attachVideo(ns);
ns.play(“trailer.flv”);

Is this the right code to have the video playback component stop playing when someone click to a different part of the site while the video is playing?

thanks

Just close the netStream
ns.close();

I’m not to sure how to put the ns.close(); into the component…right now I don’t have any actionscripting for the component. what would the actionscripting look like for the component?

[quote=dail;2358708]Just close the netStream
ns.close();[/quote]