A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: reliable "end of flv" detection?

  1. #1
    flip-flopper scottPadgett's Avatar
    Join Date
    Jan 2005
    Location
    Boston
    Posts
    425

    reliable "end of flv" detection?

    Hi folks,

    I thought I'd devised a reliable way to detect when a .flv that is playing has reached it's end by comparing the duration of the .flv with the current time at the onStatus event, but it's not working with some .flv's. I'm actually getting duration property that doesn't match the current time when the video finishes playing on some files. Does anyone know why this might be?

    I need to display a "replay" panel at the video's end, and it won't happen on these .flv's where the duration property from the meta data doesn't seem to match the length for which the clip plays...

    Does anyone know a totally reliable way to have an event triggered by an .flv reaching its end?

    Thanks!
    :: scott ::

  2. #2
    Senior Member
    Join Date
    Apr 2002
    Posts
    2,849
    It's a common issue, you'd see several posts about it if you search.

    Your options depends on which version of Flash you're exporting to, and what method you're using to play your video. Probably the most common way is to use the FLVPlayback component and listen for a "complete" event, which seems pretty reliable. It's in Flash Help under FlVPlayback.complete.

  3. #3
    flip-flopper scottPadgett's Avatar
    Join Date
    Jan 2005
    Location
    Boston
    Posts
    425
    i'll do a search. should have in the first place. i did last year, but i couldn't find anything for whatever reason.

    quick question, though, can you use a component without all of its GUI elements? like just to utilize its guts such as the "complete" event?

    thanks for the reply!
    :: scott ::

  4. #4
    Senior Member
    Join Date
    Apr 2002
    Posts
    2,849
    Yes, if you drag a FLVPlayback component onto the stage, in the parameters you can change the skin to "none". Components do add file size, though.

  5. #5
    flip-flopper scottPadgett's Avatar
    Join Date
    Jan 2005
    Location
    Boston
    Posts
    425
    cool. thanks so much.
    :: scott ::

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center