|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
I need 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(); nc.connect(null); var ns:NetStream = new NetStream(nc); myVid.attachVideo(ns); ns.play("reach_01.flv"); ns.pause(false); playButton.onPress = function() { ns.pause(false); if (video_mc._currentframe>=4) { video_mc.gotoAndStop(4); } else { video_mc.play(); } }; stopButton.onPress = function() { ns.close(); }; and several other variations that i have found on the net. please someone with this. it is driving me crazy! |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
Some quick googling tells me that there seem to be some problems with the
NetStream.close() method. I would suggest using: ns = new NetStream(nc); instead, which should completely throw away the previous stream, and replace it with a new one. |
|
![]() |
| Outils de la discussion | |
|
|