• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 580
  • Last Modified:

NetStream.close() method

I need help desperately. I have been trying and searching for a reason why the NetStream.close method does not work. sure it will stop the flv playing but it does not stop the download. it does not "makes the stream available for another use". i have several Flvs being used in a course. each on a different frame of the maintime_line. I need to have one flv completely stop downloading before the next one start otherwise my course freezes until all the downloads are done. I have used this code:

var myVid:Video;
var playButton:Button;
var stopButton:Button;

var nc:NetConnection = new NetConnection();
var ns:NetStream = new NetStream(nc);

playButton.onPress = function() {
if (video_mc._currentframe>=4) {
} else {

stopButton.onPress = function() {

and several other variations that i have found on the net.

please someone help with this. it is driving me crazy!
1 Solution
This is actually a known Flash Player bug.  You can read about it on the Flash Media mailing list.

You have to register for it, but it is the best list on all Flash Video related issues available.  Once you register, you can browse the archives for the thread from March 12, 2008 called "NetStream cannot stop downloads".

There is also another thread from February 5, 2008 called "NetStream.close fp9 bug?".  So there are indeed some issues with this.

 I think if you read through these threads, you'll get some guidance, also, you can post on the Flash Media list which will expose you to some of the best Flash Video professionals out there, including Adobe engineers who work specifically with Flash video and Flash Media Server.
Trick is to not make the Netstream and or NetConnection as a "var"

nc = new NetConnection();
ns = new NetStream(nc);

Also try to place nc and ns variable in your "root".
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Train for your Pen Testing Engineer Certification

Enroll today in this bundle of courses to gain experience in the logistics of pen testing, Linux fundamentals, vulnerability assessments, detecting live systems, and more! This series, valued at $3,000, is free for Premium members, Team Accounts, and Qualified Experts.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now