Agreed, I have only seen the NetStream.Play.Stop fire at the end of an FLV.
I recall reading, i think here, that this wasn't always the case but i could
never find another time it fired other than at the end of an FLV... It seems
as though when the video needs to buffer and catch up it will stop but only
an "Empty" code gets sent, if you pause the flv manually it doesn't seem to
send a "Play.Stop" message.

So I've been using the Play.Stop to tell me when the video is done and
haven't had any problems with it. I would be interested to know if that's
not proper though.

A rough breakdown of the onStatus handler could be something like:

ns.onStatus = Delegate.create(this,function(info:Object) {
if (info.code == "NetStream.Play.Stop"){
//playback has stopped or what i think is the end of the movie
}
else if (info.code == "NetStream.Buffer.Empty"){
/* Data is not being received quickly enough to fill the buffer. Data flow
will be interrupted until the buffer refills,
at which time a NetStream.Buffer.Full message will be sent and the stream
will begin playing again. */
}
else if (info.code == "NetStream.Buffer.Full"){
//The buffer is full and the stream will begin playing.
}
else if (info.code == "NetStream.Play.Start"){
//Playback has started
}
else if (info.code == "NetStream.Play.StreamNotFound"){
//The FLV passed to the play() method can't be found, show error
}
}
);


Dunc


On 11/16/05, Jordan L. Chilcott <[EMAIL PROTECTED]>
wrote:
>
> Why not add a listener object to the onStatus event of your
> NetStream. It will inform you when the playback has stopped. You can
> take action from there.
>
> jord
>
> On Nov 16, 2005, at 10:39 AM, Marlon Harrison wrote:
>
> > Is there any special trick to accurately getting an end of flv
> > playback event?
>
> --
> Jordan L. Chilcott, President
> Interactivity Unlimited
> Guelph, Ontario
> ---------------------------------
> Tel: (519) 837-1879
> eFax: (253) 276-8631
>
> mailto:[EMAIL PROTECTED]
> http://www.interactivityunlimited.com
> iChat/AIM: j1chilcott
>
> Author: "Building Web Sites with Macromedia Studio MX"
> Author: "Building Dynamic Web Sites with Macromedia Studio MX"
> Author: "Flash Professional 8: Training From the Source"
>
>
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to