A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: When an flv stops playing, is there a way to get it to loop and start again?

  1. #1
    http://www.LineDetail.com Line's Avatar
    Join Date
    Aug 2000
    Posts
    556

    When an flv stops playing, is there a way to get it to loop and start again?

    When an flv stops playing, is there a way to get it to loop and start again?

    -Line
    http://www.LineDetail.com | The LineDetail Drawing Co. | Theme Site Design - Art - Animation
    http://www.WebSlime.com | Low Cost Web Hosting & Domain Names

  2. #2
    http://www.LineDetail.com Line's Avatar
    Join Date
    Aug 2000
    Posts
    556
    anyone?
    http://www.LineDetail.com | The LineDetail Drawing Co. | Theme Site Design - Art - Animation
    http://www.WebSlime.com | Low Cost Web Hosting & Domain Names

  3. #3
    Senior Member layerburn's Avatar
    Join Date
    Jul 2006
    Location
    USA
    Posts
    542
    Here is what I did for mine. I added a listener object to my video. Keep in mind that my flvplayback is called "my_video", you'll need to change this to whatever your instance name is. You'll place this on the frame that the video is on.

    Code:
    import mx.video.*;
    var listenerObject:Object = new Object();
    listenerObject.complete = function(eventObject:Object):Void {
       my_video.play();
    };
    my_video.addEventListener("complete", listenerObject);
    Hope this helps!
    This is your brain. This is your brain on script.

  4. #4
    http://www.LineDetail.com Line's Avatar
    Join Date
    Aug 2000
    Posts
    556
    layerburn, you rock thanks a ton!

    -Line
    http://www.LineDetail.com | The LineDetail Drawing Co. | Theme Site Design - Art - Animation
    http://www.WebSlime.com | Low Cost Web Hosting & Domain Names

  5. #5
    Junior Member
    Join Date
    Apr 2007
    Posts
    18

    FLV loop

    Glad you got it working,

    Here is another way: The NetStream.Play.Stop is the key to the universe, hehehe.

    So add this code for what ever events you want to happen

    ns.onStatus = function(info) {
    if (info.code == "NetStream.Play.Stop") {
    ns.seek(0);
    ns.play();
    }
    };

    also what ever other actions you want to happen can go here. Like, instead of the ns.play, you could have ns.pause, gotoAndPlay ("label"); or do what ever.

    Here is the website that broke it open for me.

    http://www.communitymx.com/content/a....cfm?cid=984BA

    good luck

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