# Problems figuring out random flv player

**URL:** <https://forum.kirupa.com/t/problems-figuring-out-random-flv-player/292481>\
**Category:** flash\
**Created:** [July 14, 2009, 6:27pm UTC](https://forum.kirupa.com/t/problems-figuring-out-random-flv-player/292481 "2009-07-14T18:27:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mistyneyens](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@mistyneyens](https://forum.kirupa.com/u/mistyneyens)\
**Post date:** [July 14, 2009, 6:27pm UTC](https://forum.kirupa.com/t/problems-figuring-out-random-flv-player/292481/1 "2009-07-14T18:27:01Z")

</div>

I am still kind of a noob with AS3. Any idea how I could incorporate an array into the following simple player which would pull a random file from a separate folder after the user’s chosen video has played?:

```auto
stop();
function videoOne(event:MouseEvent):void{
    pubPlayer.source = "flvs/01.flv";
}
function videoTwo(event:MouseEvent):void{
    pubPlayer.source = "flvs/02.flv";
}
function videoThree(event:MouseEvent):void{
    pubPlayer.source = "flvs/03.flv";
}

OneV.addEventListener (MouseEvent.CLICK,videoOne);
TwoV.addEventListener (MouseEvent.CLICK,videoTwo);
ThreeV.addEventListener (MouseEvent.CLICK,videoThree); 

```

I am trying to arrange for a button to be pushed and for the selected video to play and then to load a random response video after selected video is finished playing. I am thinking it would be similar to a commercial playing after a video. Thanks so much!
