# Loop a video with buttons

**URL:** <https://forum.kirupa.com/t/loop-a-video-with-buttons/288759>\
**Category:** flash\
**Created:** [May 20, 2009, 5:20pm UTC](https://forum.kirupa.com/t/loop-a-video-with-buttons/288759 "2009-05-20T17:20:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Perinau](https://avatars.discourse-cdn.com/v4/letter/p/f07891/32.png) [@Perinau](https://forum.kirupa.com/u/Perinau)\
**Post date:** [May 20, 2009, 5:20pm UTC](https://forum.kirupa.com/t/loop-a-video-with-buttons/288759/1 "2009-05-20T17:20:09Z")

</div>

Hello.  
I’m having a little problem.  
I have created small videoes (flvPlayers), with a play and a pause button (from the component menu).  
I can’t get these to loop without a glitch when they start over again. And the buttons dont make it easier.

You can see/hear it yourself here [http://home.no/per-erik/seq/flash/bass1.swf](http://home.no/per-erik/seq/flash/bass1.swf) (NB! turn down your volume, its a bass loop),

This is the code im using now. As you see, its not good enough, the loop have to go smooth.

```auto

 import fl.video.VideoEvent;
 flvPlayer.addEventListener(VideoEvent.COMPLETE, videoFinished);
 function videoFinished(event:Event){
        flvPlayer.play();
 }; 

```

I found this thread [http://www.kirupa.com/forum/archive/index.php/t-223137.html](http://www.kirupa.com/forum/archive/index.php/t-223137.html) , but I dont understand how to pull it together.

Anyone who knows about a better solution, or how to integrate one of the codes from the thread above?
