Ask a Question related to Macromedia Flash Flashcom, Design and Development.
-
minzojian #1
how to loop play a FLV file in FMS
hello,everyone,i wanna fms play a recorded flv file again and again,but i don't
know how to do it.
i try directly use "Stream.play",failed.
then i try PLAY again after i got the "NetStream.Play.Stop" status info code
when the 1st time playing over.then its really can loop play now,however,the
Stream object didn't clear up,since one new PLAY function called,new Stream
created,and the old Stream object kept.over and over,they took lots of memory.
i just wanna FMS can loop play a single FLV file....
can anyone help me? thx very much.
minzojian Guest
-
fms ns.play(file, -2) Vs ns.play(stream, -2)
Hi, I have a very strange problem. I have created an application on fms. on the streams/_definst_/instance directory there is a sample flv... -
Flash Player 8 plugin lacks loop and play options
Up to flash player 8, there were play and loop menu items on the right click of a player plugin. In 8, they are gone. So, short of adblocking... -
How do I play an effect loop
Has anyone got an elegent way to repeat an effect while the mouse is over something, like a fade in and out. -
Can a film loop play once, then loop on the last frame(s)?
I need a film loop to play once, then loop playback on the last frame so I can keep the LOOP of the film loop set. This will allow the tell commands... -
Using Film Loop For Mouse Over - Why does it play only once?
If you change the member rather than just hiding the sprite the film loop will restart each time. Something like. property spritenum on... -
JayCharles #2
Re: how to loop play a FLV file in FMS
It would be helpful if you post your code. There's no reason you shouldn't be able to replay a stream from it's onStatus event handler, so it's probably a syntax issue.
JayCharles Guest
-
oalekdesign #3
Re: how to loop play a FLV file in FMS
var _nc:NetConnection = new NetConnection();
_nc.connect("rtmp://localhost/test/test/");
_nc.onStatus = function(_info) {
trace("Level: "+_info.level+" Code: "+_info.code)
if (_info.code == "NetConnection.Connect.Success")
trace("connected to: "+this.uri);
};
var _ns:NetStream = new NetStream(_nc);
_ns.connect(_nc);
_ns.setBufferTime(5);
video.attachVideo(_ns);
_ns.play("test"); // no test.flv
_ns.onPlayStatus = function(_info) {
for(var prop in _info) {
trace(prop+' '+_info[prop]);
}
if(_info.code =="NetStream.Play.Complete")
_ns.play("test"); // no test.flv
}
Be CooL
oalekdesign Guest
-
minzojian #4
Re: how to loop play a FLV file in FMS
thx.
what i mean is FMS play a FLV file and brocast as a defined stream name.check
what am i do.
application.onAppStart = function() {
this.videofile = "test1";//one FLV file named test1.flv
this.videoname="foo"
this.newstream = Stream.get(this.videoname);
if (this.newstream) {
application.newstream.play(application.videofile, 0, -1);}
}
AS these codes,one flv file named test1.flv will be play and brocast as a
stream named foo when the application start.however,this one can only play once.
if i add a onStatus handler to call the play functionn again when the first
time playing over.like this...
application.newstream.onStatus = function(info) {
trace(info.code);
(info.code == "NetStream.Play.StreamNotFound") {//do nothing...
}
else if (info.code == "NetStream.Play.Stop") {//try to stop play the last
stream...in order to clear the steam objct,but not work...
if (application.newstream.play(false)) { application.newstream = null;
}
}
else if (info.code == "NetStream.Unpublish.Success") {
//when the last one unpublish success,publish a new one again.
application.newstream = Stream.get(application.videoname);
if (application.newstream)
{ application.newstream.play(application.videofile, 0, -1);
}
}
};
that's all.scripts r only for server side,don't care about the client side.
i can loop play that flv file with these script,however,the stream object
can't be clear up automaticly.u can check this situation in the fm2_console
application.
minzojian Guest



Reply With Quote

