FYI,
When I post to this list I'm openly and honestly explaining my
situation.
I would never suggest that someone with as much experience as yourself
'pulled code out of their ass'.
I have a fair bit of experience myself and it wasn't working for me.

The links I included were simply to illustrate that others had the same
difficulty. No they didn't have the answers, or I wouldn't have needed
to post here asking for help.

I was calling

ns.pause()
nz.close()

I wasn't setting the object to null or waiting x milliseconds. I didn't
want to re-instantiate the object. A delay was something I was
considering.

What it turned out to be was that in some other class in the same
sequence of events the NetConnection object instance was having it's
setServer method called *before* the ns.pause() and ns.close().
I rearranged the code and it worked. Streams terminate as they should.
Client is happy.

Seriously, thank-you for your help, I do appreciate it. There's no need
to get upset mate.

Barry.



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Steven
Sacks
Sent: Tuesday, 8 July 2008 8:36 p.m.
To: Flash Coders List
Subject: Re: [Flashcoders] Netstream fails to close

Barry,

FYI, I didn't just throw out an idea and pull some code out of my ass.  
I have tackled this exact issue for a client that needed to stop a 
stream from downloading when they closed the stream, and couldn't 
actually kill streams when the user interaction resulted in spamming new

NetStreams.  The solution is to throttle the requests, using the exact 
code I provided.

If you're saying you call

ns.pause();
ns.close();
ns = null;

and the NetStream continues to download afterwards *when you do not 
attempt to open another NetStream*, then there's something else going on

because that works.  If you immediately try to play another stream, even

if it's not on same NetStream instance, then the previous one will not 
stop downloading (that's the bug).

When you throttle the requests for new streams, the problem goes away.

-Steven



_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Scanned by Bizo Email Filter


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to