flash question
- Started
- Last post
- 6 Responses
- killrobbailey
I am working on a little flash file and can not get this video to stop looping! I thought netStream.loop(false); would handle it but it does not. What am i doing wrong?
Thanks for your help.var netConn:NetConnection = new NetConnection();
netConn.connect(null);
var netStream:NetStream = new NetStream(netConn);
netStream.onStatus = function(infoObject) {
if (infoObject.code == "NetStream.Play.Stop") {
netStream.seek(0);
netStream.play.stop();
}
};
myVideo.attachVideo(netStream);
netStream.setBufferTime(0);
netStream.play("");
- hawkwah0
this guy'll sort you out: http://www.gotoandlearn.com/
- thatblokemike0
if (infoObject.code == "NetStream.Play.Stop") {
netStream.seek(0);
netStream.play.stop();
}that looks wrong.. netStream.play.stop(); ??
doesn't that throw an error?.. your calling an method on a method. without looking at NetStream I doubt play is a property.
also your seeking back to the start on a status update so effectively your telling it to loop. so maybe even overriding the loop false stuff.
- killrobbailey0
I don't get an error. It just replays. Currently I have the FLV playing on one frame. Is there a way to tell it to move to the next frame upon completion of the video?
- thatblokemike0
if (infoObject.code == "NetStream.Play.Stop") {
gotoAndPlay(_currentframe+1);
}- where would that fall in my code? or is my code just shit?
killrobbailey
- where would that fall in my code? or is my code just shit?
- killrobbailey0
I got it working now. Thank you for the help.
- powertoni0
just as a tip.....the fastest way you could have figured this out is to simply highlight "NetStream" then choose right click (ctrl if yr a mac) and choose help and it will take you exactly where you wanna go.....
I think the built in documentation is a great way to learn....alot of the time they have examples that might be similar to what you are trying to do...