Results 1 to 4 of 4

Thread: How to loop flv files?

  1. #1
    Join Date
    Feb 2006
    Posts
    126

    How to loop flv files?

    Generally flv files are flash files and i dont see any option given anywhere for its loop feature. So can anyone tell me how to loop flv files? How to get a .flv file to loop or restart itself when it's done playing? Thanks for any help.
    ALWAYS RIGHT - OTHER WISE I WUDNT SEY IT

  2. #2
    Join Date
    Dec 2007
    Posts
    1,547

    Re: How to loop flv files?

    You can do something like this if you are loading external flv files and using the NetStream method accepting that you know the length of your .flv file:

    if(my_ns.time==90){
    my_ns.seek(0);
    }

    my_ns is your NetStream. (check out the actionscript dictionary)

  3. #3
    Join Date
    Dec 2007
    Posts
    1,736

    Re: How to loop flv files?

    Looping an FLV file requires being able to detect the end of the FLV, so this tutorial will cover both. The recommended method of detecting the end of the FLV playback is via the NetStream::onStatus event handler, by checking for NetStream.Play.Stop event. However, many people have reported that this event is not always sent (which could be due to undocumented bugs in the flv implementation on the NetStream class). For that reason, we will also need to create workaround for FLV files that does not send the NetStream.Play.Stop event.

    More information here.

  4. #4
    Join Date
    Dec 2007
    Posts
    1,599

    Re: How to loop flv files?

    Hope the below code help you

    Code:
    listenerObject = new Object();
    listenerObject.complete = function(eventObject){
    myMedia.stop();
    myMedia.play();
    trace ("ready");
    }
    _root.myMedia.addEventListener("complete", listenerObject)

Similar Threads

  1. Watercooling: Single loop or Dual Loop
    By Akolekar in forum Hardware Peripherals
    Replies: 3
    Last Post: 21-10-2011, 10:52 PM
  2. Reboot Loop in Windows 7 Reboot loop and Safe mode doesn't work
    By mADiRAkSHii in forum Operating Systems
    Replies: 4
    Last Post: 25-01-2011, 07:23 PM
  3. For loop ignore hidden files
    By Juaquine in forum Software Development
    Replies: 4
    Last Post: 10-02-2010, 06:13 PM
  4. Which is best for iterator: For loop or while loop
    By Leeland in forum Software Development
    Replies: 4
    Last Post: 18-01-2010, 06:03 PM
  5. Differentiate between Do-While loop and While loop
    By REDBULL in forum Software Development
    Replies: 3
    Last Post: 26-11-2009, 10:10 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,510,391.01609 seconds with 16 queries