I have a .flv video loading dynamically in a holder mc. Works great, but when I click on a link to another frame it continues to play..
How do I make it stop playing when it leaves that frame?
thanks..
Printable View
I have a .flv video loading dynamically in a holder mc. Works great, but when I click on a link to another frame it continues to play..
How do I make it stop playing when it leaves that frame?
thanks..
Unload the .flv. By the way, what do you mean "dynamically"?
sporty
thanks for the reply.. i was in a hurry when i sent that question.. Sorry..
I am not sure what the code would be. I have been looking for the unload action but not able to get it to work..
thanks
Are you streaming the flv into a video object using netStream?
on(release){
delete my_ns;
}
Yes I am..
And I have button that when pressed goes to a new frame. the movie needs to stop playing..
i will try that code and see.. thanks..
That code will stop the movie, but it won't unload it. If your going to another frame, maybe you should delete any frames in the video object layer, so it's just not there at the other frame.
Ok.. that didnt work.. I put the code on the button that I use to take to the new frame..
I am confused on where to put the code and what to use..
Not sure what code your using to load the flv. In my case, my_ns is the name of the new net stream object.
Here is my code I am using..
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
theVideo.attachVideo(ns);
ns.play("intromovie.flv");
rewindButton.onRelease = function() {
ns.seek(0);
}
playButton.onRelease = function() {
ns.pause();
}
var videoInterval = setInterval(videoStatus,100);
var amountLoaded:Number;
function videoStatus() {
amountLoaded = ns.bytesLoaded / ns.bytesTotal;
loader.loadbar._width = amountLoaded * 222;
}
Thanks for helping me out..
Add the delete line to the button that goes to the next frame.
Ok,
I am not sure what you mean.. I am sorry just not that good at AS..
Could you post what you mean..
Yours might look like this;
on(release){
delete NetStream;
_root.gotoAndPlay(2);
}
Well that doesnt work either.. Error says
Classes, interfaces, and built-in types may not be deleted.
delete NetStream;
any other ideas.. and I do appreciate all your help..
Can you attach the fla?