yes very close
When the video is finished
ns.time=228.528
and duration=228.66;
So ns.time>=duration-0.5 give me good result.
I don't know how flv was created. So this way allow me to find what I need.
Thank you very much.


2007/1/18, Helen Triolo <[EMAIL PROTECTED]>:

Does ns.time trace something close to duration, just not exactly equal
at the end?  If so, just check for >= duration - somesmallamount (maybe
to do with the buffer size) instead of ==.  Is this a progressive or
streamed flv, btw?

I dug up this old flashcomm post from Brandon Krakowsky in case it's any
use:

> I noticed that as well.  I've never had good luck with
> "NetStream.Play.Stop".  I think part of the problem is that
> some FLVs never get to the very end of the file - maybe .5
> seconds before the end.
> The other part of the problem might be the encoder you're
> using.  Flash 8 Encoder vs. Riva vs. Flix.
>
> I avoid the whole thing by monitoring the playhead inside of
> a setInterval or onEnterFrame, and comparing it to the
> totalTime.  This way, I never have to worry about those
> objects not firing.  Once again, I DO run into the problem
> where the playhead doesn't get all the way to the end, so
> tend to look for the playhead to be .5 seconds from the end,
> or more.  Seems to do the trick everytime.  Of course, if you
> can, make sure the videos have a little extra something at
> the end so they don't get cut off.


Helen

natalia Vikhtinskaya wrote:

> So as I understand no way to determine that video is finished with
> NetStream
> object?
>
> 2007/1/18, Karina Steffens <[EMAIL PROTECTED]>:
>
>>
>> Sorry, it's bee a while since I wrote that script, so I forgot to
>> mention
>> that movie_flv in my code is an AS2 Video Playback component that has
>> the
>> movie attached to it instead of a simple movie clip. It's located in
the
>> components panel.  You might want to try theVideo.playheadTime instead,
>> but
>> if that doesn't work, you could try using this component instead. Or
>> better
>> yet, if you're using Flash 8, try the new video component that Muzak
>> mentioned (Flv Playback) which has a "complete" event.
>>
>> PS: I just saw Helen's post - that's definitely worth a try.
>>
>> Karina
>>
>>

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to